xTuple.com xTupleU Blog & News Customer Support

DD-MM-YYYY in QDateEdit boxes

When setting the date in OpenMFG to DD-MM-YYYY format, the QT Date entry fields remain still in the U.S. MM-DD-YYYY format.

We are based in the UK and feel this will cause confusion for our users.

6/12/2008 or 12/6/2008 could be in December or June depending on the window being viewed.

Here’s a general idea for a resolution, the real solution would of course be part of a class:

// Definition of selected format
extern enum QDateEdit::Order qDateFormat;

// Set the above extern based on the locale’s date format
switch (dateFormatInMenu) {
case (DMY):
qDateFormat = QDateEdit::DMY;
break;
case (MDY):
qDateFormat = QDateEdit::MDY;
break;
default:
qDateFormat = QDateEdit::YMD;
}

and then on each date entry box:

// make sure each date entry box is set like this, with the selected date format
dateEditBox->setOrder(qDateFormat);

Thanks!

Phil

gjohnson,
Yes, this is a known issue logged as [url=http://www.xtuple.org/mantis/view.php?id=4490:27r6ruo8]http://www.xtuple.org/mantis/view.php?id=4490[/url:27r6ruo8].

I’ve staged it to be addressed 3.0 development cycle. Â We already use our own widget for dates, so it should be fairly straight forward to address the issue.

Thanks for highlighting it and your comments.

JohnÂ

On Jan 30, 2008, at 5:23 AM, ukpeg wrote:

[quote:27r6ruo8]When setting the date in OpenMFG to DD-MM-YYYY format, the QT Date entry fields remain still in the U.S. MM-DD-YYYY format.

We are based in the UK and feel this will cause confusion for our users.

6/12/2008 or 12/6/2008 could be in December or June depending on the window being viewed.

Here’s a general idea for a resolution, the real solution would of course be part of a class:

// Definition of selected format
extern enum QDateEdit::Order qDateFormat;

// Set the above extern based on the locale’s date format
switch (dateFormatInMenu) {
case (DMY):
qDateFormat = QDateEdit::DMY;
break;
case (MDY):
qDateFormat = QDateEdit::MDY;
break;
default:
qDateFormat = QDateEdit::YMD;
}

and then on each date entry box:

// make sure each date entry box is set like this, with the selected date format
dateEditBox->setOrder(qDateFormat);

Thanks!

Phil

[/quote:27r6ruo8]

Post generated using Mail2Forum at xTuple forums

I could not find the issue in the tracker when I searched, Thanks for your response!

This is something I had been contemplating posting about for some time. Good to see that someone else in the UK got there first.

Now there are two of us we should start a UK OpenMFG users group.

Kurt

Thanks for the prompt reply.

Hi,

I’m implementing Postbooks at a client site based in New Zealand. The office staff have expressed some concern over the input of dates in US format as opposed to the UK format that we follow here.

I’ve had a search around and most of the information is pretty old. I’m assuming that changing the locale information to produce output in the correct format (eg, in reports) should be easy since there’s a bit of information about it.

I don’t know how relevant this other thread (http://www.xtuple.org/node/956) is though.

Also, like mentioned above, the bug tracking ticket isn’t there anymore.

Anyone care to point me in the right direction, or let me know if there’s been any changes to the system to support businesses that use DD-MM?

Thanks in advance.

-Greg

Setting up your locale will handle it. Check your locale settings in the system->set up.

Hi Greg,

I have successfully implemented PostBooks in New Zealand and we are happily entering dates in the DD/MM/YYYY format. I believe this is picked up from your Operating System settings as I have made no special configuration changes to format dates. The thread you mention refers to the output of dates on Reports so if you want a different date format printed, you need to make the changes there.

Regards,
Dave

A bit late, But I have the same problem on windows, anderson.
Windows is set for 4 digit year yet my DateCluster only shows 2 digit year.

image