function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Carl_VCarl_V 

Locale setting affecting date entry manipulation

Hi All,
 
Can anyone shed some light on how the locale setting impacts date type entries on a form?  I have realised whilst building an s-control that uses a calendar popup, if I use 'English (US)' locale setting, then input works properly (ie 2nd April minus 1st April = 1 day).  If I use my actual locale 'English (Australia)' then after selecting April 2nd on calendar popup, the 'April 2nd' I chose minus 1st April = 31 days - its switched the day and month. Interestingly, the date displays in correct format, but obviously underlying number doesnt behave like it.
 
Is there some way I can manipulate the input from the widget prior to performing simple date calcs to eliminate this problem?
 
Regards,
Carl_V
KSFDCKSFDC
Hi Carl & all..
 I am facing something similar to you.When I use classic date picker
 
"<a href="javascript:openPopupFocus('/home/calendar.jsp—form=editPage&field=StartDate&mo=0',
  '_blank', 186, 170, 'width=186,height=170,resizable=yes,toolbar=no,status=no,scrollbars=no,menubar=no,directories=no,location=no,dependant=yes', true, true);clearlist();"
 class="datePicker" title="Pick A Date (New Window)" onclick="setLastMousePosition(event)"
 onchange="document.editPage.focusThisFieldOnLoad.value='StartDate';document.editPage.submit();"
 id="StartDatePopCal"><img src="/s.gif" alt="Pick A Date (New Window)" class="datePickerIcon"></a>"
 
inside S-control. We have uniform practice of Regional stteings for date and time for all the users over globe.We use mm/dd/yyyy date format and my s-control works fine everywhere with this setting .but recently the date picker is showing dd/mm/yyyy format for UK locale .Is there any dependency of datepicker on regional settings ??
Does date picker date change on Locale settings??
 
can somebod shade light on this??
Tahnks in advnance.
 
K-SFDC Admin