DATE (DATEINPUT) - Date Input Control problems

Hi there,

when we use the “DATE” - Control (aka DATEINPUT CONTROL) of the control topics (toolbox), we have a problem.
The little calendar which pops-up provides the months and the days and everything in english. As soon as you double click a certain value for selection, the displayed date string is german. For example this format:
16.01.2007 instead of 01/16/2007 or any other format.
Where can we specify the displayed format of this specific type of input field (Dateinput)? Is this a bug?
Do we have to correct the problem in the corresponding JavaScript?

Thanks in advance!

Hi Koki!

class SessionContext defines the available formats…


SessionContext.DATE_DDPMMPYYYY
SessionContext.DATE_MMSDDSYYYY
...

Within the (login) adapter processing call…


Adapter.setDateDisplay(SessionContext.DATE_MMSDDSYYYY);

…to set/update the display format. Like with “setLanguage” or “setStyle” you just call it once and it affects the whole user session.

Martin

Hi!

Thanks for the hint!
It seems to work.
BUT, if I use this kind of notation within the login adater, I need to specify at that time, which format I will configure. This is my code at the moment.
Is this correct?

            //GERMAN
if (this.getLanguage().equals(Locale.GERMAN.getLanguage()))
	{
		setDateDisplay(SessionContext.DATE_DDPMMPYYYY);
	}
	//USA
	else if(this.getLanguage().equals(Locale.US.getLanguage()))
	{
		setDateDisplay(SessionContext.DATE_MMSDDSYYYY);
	}
	//British 
	else if(this.getLanguage().equals(Locale.ENGLISH.getLanguage()))
		setDateDisplay(SessionContext.DATE_DDSMMSYYYY);

Every Adapter has the method getLanguage(). This is the language which is configured inside the browser. I use this language to compare it with the language abbrevation from Locale..getLanguage().
I tested it and it works fine!
Thanks XGRU!