Aditya Singh 3 Posted March 25, 2020 Posted March 25, 2020 I am using date calendar usinghttps://spotfired.blogspot.com/2014/05/popup-calendar-webplayer-compatible.htmlbut when I select date in calendar, it is going in US format. Is there any way to force it to format the date in UK format ie. dd/mm/yyyy.
Kirsten Smith (she/her) Posted March 25, 2020 Posted March 25, 2020 Spotfire will use the Regional settings on your computer to determine date format.
Aditya Singh 3 Posted March 25, 2020 Author Posted March 25, 2020 Thanks, my regional settings are set to UK format only but still it is going to US format.
Khushboo Rabadia Posted March 26, 2020 Posted March 26, 2020 Answer is there in same blog in comments section: ------------------------------------------- Anonymous said... Hey nice blog but how can I change the format for the date time picker as when I am opening the report from UK as the system date setting are in dd-mm-yy format its taking wrong date but on opening it from US is working fine what I understood that we need to add regional setting. How can we add it $.datepicker.setDefaults( $.datepicker.regional[ "" ] ); As if I select 10- Nov -2014 from london its changing it to 11-Oct -2014 but from US systems its working fine February 17, 2015 at 12:35 AM Jose Leviaguirresaid... Add "altFormat" to your "pickerOptions" object: $( ".selector" ).datepicker({ altFormat: "dd-mm-yy" }); Here is the documentation for all available options: http://api.jqueryui.com/datepicker/ February 17, 2015 at 5:43 PM -------------------------------------------------
Aditya Singh 3 Posted March 31, 2020 Author Posted March 31, 2020 Thanks, I already tried this but my date format is not changing even after formatting in code.
Khushboo Rabadia Posted March 31, 2020 Posted March 31, 2020 It worked at my end on applying below settings.
Aditya Singh 3 Posted April 6, 2020 Author Posted April 6, 2020 Thanks, it worked. my code was having typos which was preventing it. I used dateFormat: "dd-mm-yy" , both dateFormat and altFormat worked.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now