This is a migrated thread and some comments may be shown as answers.

Need information about date picker

1 Answer 44 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Kavi
Top achievements
Rank 1
Kavi asked on 30 Oct 2011, 07:26 PM
Hi ,

  I am using radDatetImepIcker as a seperate control .(Not inline with grid or anything else). I need to set date/time in picker by default based on my server time zone like ‘DD.MM.YYYY HH24:MI:SS TZR’.


Please advice as soon as earlier.

THanks,
Priya

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 02 Nov 2011, 08:29 AM
Hello Kavi,

The RadDateTimePicker (and the DateInput itself) does not manage the timezones.
So you could use format expression like: "dd.MM.yyyy hh:mm:ss".
When you get the SelectedDate you will get a DateTime object parsed with unspecified time zone. You could later convert the time in different timezone manually if you need.

Please also note that the DateTime object itself does not store information about the timezone. For more information check these resources:
http://msdn.microsoft.com/en-us/library/system.datetime.kind.aspx
http://msdn.microsoft.com/en-us/library/system.datetime.utcnow.aspx
http://msdn.microsoft.com/en-us/library/system.datetime.aspx

Greetings,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Kavi
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or