0

I am using Jquery datetime picker for calendar display

var today = new Date();  
jQuery('.strathidden , .endhidden').datetimepicker({
         minDate:today
});

I want to add timezone to this component so that the calendar should come with respect to the timezone.

Say for example if in India the date is 29/02/2016 14:37:20 PM so when calendar is open it should point to the current and time of India but if my timezone is in different zone for example GMT-7 so its current date is 29/02/2016 14:10:20 AM so the calendar points to the current date of GMT-7 timezone.

cheffe
  • 9,345
  • 2
  • 46
  • 57
Ram Somani
  • 231
  • 3
  • 12
  • First of all it's not a good idea nor it is possible to get the timezone using javascript or jquery from a browser for more better explanation click [here](http://stackoverflow.com/a/18252251/3855179). So you need to get the timezone using the server logic. Once you get the timezone, i would suggest you to use moment js to convert the date-time and pass it to the datetime picker. – Sumit Surana Feb 29 '16 at 09:27
  • Thanks Sumit can you elaborate more about the to get timezone using the server logic – Ram Somani Feb 29 '16 at 10:46

0 Answers0