Getting SPControls.DateTimeControl to display the local date format

29 May, 2009

Getting SPControls.DateTimeControl to display the local date format

One of the minor problems with SLK was that on the Assignment Properties page the Start and Due dates were always being shown in US format, no matter what the regional setting were. There was a really simple fix, you just need to set the LocaleId of the DateTimeControl and then it will display the date in the regional format of the site.

                spDateTimeStart.LocaleId = SPWeb.Locale.LCID;
                spDateTimeDue.LocaleId = SPWeb.Locale.LCID;

A version with this fix in is now available on the 1.3.2 build page.
 

 

Richard Willis

Written by

Copyright © 2024 SalamanderSoft Limited