ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
DatePicker default date format
Title:
B
I
{code}
?
What determines the date format in the date picker? On my dev laptop, I get the correct date format: `dd/MM/yyyy`. On my prod server, I get the US format: `MM/dd/yyyy` even though I have my system settings to `dd/MM/yyyy` This is creating date calculation problem. Can I force it to `dd/MM/yyyy` ?
Save Changes
Cancel
rakesh
asked at 22 Feb 2019
Answers
B
I
{code}
?
it is based on the current culture by default `CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern` note in the [https://prodinner.aspnetawesome.com/ prodinner demo] when then user changes the language the dateformat changes also (according to the culture) you can also set it manually using `.DateFormat(str)` in `utils.js` `init` method (called by `Html.Awe().Init()` in Layout.cshtml) the jquery.validate dateformat is also set to match the server one (if there is jquery.validate)
Save Changes
Cancel
Omu
answered at 22 Feb 2019
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK