Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
webdatechooser format different on two machines - how can i stop this
posted

hi,

i have just tried a web app i am writing on another machine than my test machine and in the WebDateChooser, the day and the month are the wrong way around to that of the development machine - which means all my dates are screwed up.

is there a way to force the format for the WebDateChooser to, in my case, United Kingdom or dd/mm/yyyy

thanks.

onan.

  • 12631
    posted

    The WebDateChooser control determines what date format to use by listening to the Culture set on the page, so if you want to explicitly set that you can either add the Culture attribute in your pages @Page directive, or set it in code:

    Thread.CurrentThread.CurrentCulture = new CultureInfo(“en-GB”);

    Devin