# DATE (DATEINPUT) - Date Input Control problems

**URL:** <https://techcommunity.softwareag.com/t/date-dateinput-date-input-control-problems/57574>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [January 16, 2007, 8:59pm UTC](https://techcommunity.softwareag.com/t/date-dateinput-date-input-control-problems/57574 "2007-01-16T20:59:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konstantin](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@Konstantin](https://techcommunity.softwareag.com/u/Konstantin)\
**Post date:** [January 16, 2007, 8:59pm UTC](https://techcommunity.softwareag.com/t/date-dateinput-date-input-control-problems/57574/1 "2007-01-16T20:59:44Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Martin\_Grumann](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Martin\_Grumann](https://techcommunity.softwareag.com/u/Martin_Grumann)\
**Post date:** [October 11, 2006, 7:38pm UTC](https://techcommunity.softwareag.com/t/date-dateinput-date-input-control-problems/57574/2 "2006-10-11T19:38:16Z")

</div>

Hi Koki!

class SessionContext defines the available formats…

```auto

SessionContext.DATE_DDPMMPYYYY
SessionContext.DATE_MMSDDSYYYY
...
```

Within the (login) adapter processing call…

```auto

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

---

<div class="post-metadata">

**Author:** ![Konstantin](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@Konstantin](https://techcommunity.softwareag.com/u/Konstantin)\
**Post date:** [January 16, 2007, 11:13pm UTC](https://techcommunity.softwareag.com/t/date-dateinput-date-input-control-problems/57574/3 "2007-01-16T23:13:13Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/date-dateinput-date-input-control-problems/57574/4 "2021-04-02T14:38:43Z")

</div>


