Jump to content

Localization For Calendar Pop-Up Date


cpcbsa

Recommended Posts

Hi everyone. I need to change the format of the pop-up selector in a datapage or even for the whole app. I have changed the localization of the date/time to the format I want 9/27/2014 when I click a date in a calendar pop-up. However, even though I have set the localization for this format, it adds a 0 in front of all the months that are one digit. No matter what I can not get the format to change on a calendar pop-up. Where do I change the calendar pop-up format to 9/27/2014 instead of 09/27/2014 (this is what it does)

 

THANKS

Link to post
Share on other sites

Hello cpcbsa,

 

As far as I know, in Localization you can define the Output format of a date. You can define only the order of days and months, for example, "dd/mm/yyyy" or "mm/dd/yyyy" for the Input format. 

I think, you can try the following script (it is better to add a Header&Footer element and enter the code to the Footer):

<SCRIPT LANGUAGE="JavaScript">
function deleteZero()
{ 
var enteredValue = document.getElementById("InsertRecordfildename").value;
if (enteredValue.substr(0,1) == '0')
      {
         document.getElementById("InsertRecordfildename").value = enteredValue.substr(1);
       }
}   
document.getElementById("InsertRecordfildename").onchange=deleteZero;
</SCRIPT>

This script deletes the first zero, if it present.

Please, enter name of your field instead of fildename in "InsertRecordfildename".

 

I hope it helps.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...