tags:

views:

77

answers:

1

hi,i am developing a multi language site.My problem is i need to set the date and time in the datepicker from the database as the user may have choose the different timezone while registering in the site.At present i am getting the server time on my jquery datepicker.

Thanks in advance.

Technology used:Asp.net mvc,Jquery. Database:Sql server2005. O/s :winxp.

A: 

http://docs.jquery.com/UI/Datepicker#option-dateFormat

http://docs.jquery.com/UI/Datepicker/formatDate

$(".selector").datepicker({ dateFormat: format, defaultDate: val });

the dateFormat option supports different formatDate types, you can also pass a Date object to defaultDate.

To adjust to the user's timezone, use DateTime.ToUniversalTime() and adjust according to the user's specified time zone.

N. Lucas
its not working
sagar