Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
DateTime formatting
posted

Hi,

I'm trying to have a cell in the grid that allows user to see and input a datetime value. I'm using for this [UltraDateTimeEditor] which has the properties set as

datetimeEditor->FormatProvider = System::Globalization::CultureInfo::CurrentUICulture->DateTimeFormat;
datetimeEditor->MaskInput = "{date} {time}";
datetimeEditor->FormatString = System::Globalization::CultureInfo::CurrentUICulture->DateTimeFormat->ShortDatePattern + " " +
System::Globalization::CultureInfo::CurrentUICulture->DateTimeFormat->LongTimePattern;

datetimeEditor->AutoFillTime = Infragistics::Win::UltraWinMaskedEdit::AutoFillTime::Midnight;
datetimeEditor->AutoFillDate = Infragistics::Win::UltraWinMaskedEdit::AutoFillDate::MonthAndYear;
datetimeEditor->Value = "00/00/0000 00:00:00";

but it display wrong datetime in a wrong format in a non-english enronment. See this image (windows is using Slovenian settings)
https://www.dropbox.com/s/8tjkzmgjbcjkomm/1.png?dl=1

How do I set properly the properties to mimic exactly the system settings?

Thx 

 

Parents Reply Children