DateTimeControl Sharepoint Dev

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • truezplaya
    New Member
    • Jul 2007
    • 115

    DateTimeControl Sharepoint Dev

    I am currently working on a piece of software that works!!!!!!

    However, the DateTimeControl is using the incorrect locale and/or regional settings.

    It is the only date on my sharepoint site that is giving me the incorrect format and it's starting to bug me!

    I have changed the settings on the server to the correct locale/regional settings and i have checked my browser has the same language settings.

    I have put this as a .net issue as it's only that control thats is incorrect!!!

    Any answers are hugely appreciated.

    Cheers
    Truez
  • truezplaya
    New Member
    • Jul 2007
    • 115

    #2
    Hi all i've managed to crack it!!.

    The control didn't seem to be inheriting the default locale id.

    You can set this within your control properties.

    Code:
    DateTimeControl objDTControl = new DateTimeControl();
    objDTControl.LocaleID = SPWeb.Locale.LCID;
    Cheers truez

    Comment

    Working...