Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Iam having a html 5 input date type datepicker field.
have ti implementing client side validations by comparing with existing dates in database and current date.

Here the issue is with browser culture language
for example exDate= 09/10/2014

When the browser language en-US new Date(exDate) is returning correct Sep 10 2014
but if the browser language en_AU (australia) which is returning Oct 09 2014.
So could not able to display relevant pop up message.
Using MVC4, Html 5 razor view and jquery

Note: In date picker the date needs to display based on the culture
Posted

1 solution

You could retrive the date format from the server using the cultureinfo and assign that date format to the jquery datepicker. Please go through the below link.

http://stackoverflow.com/questions/12457763/datetime-binding-from-jquery-datepicker-to-mvc-problems[^]

http://stackoverflow.com/questions/8531247/jquery-datepickers-dateformat-how-to-integrate-with-net-current-culture-date[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900