3

I have a SharePoint custom Form where I have SharePoint Default date column and three custom controls for Hours minute and Second. So by default on page load,the date in SharePoint Date Field is taken as Today and the hours, minutes and seconds are loaded with current server time which can be changed by the user as per the need.

Problem is when user is opening the form between 23 hrs to 00 hrs it loads the next day in the SharePoint Date field.

Like for example: if I am filling the form on 7th June 2016 at a time before 11:00 pm my date field will show 7th June 2016. But if I fill the form on 7th June at 23:00 hrs it takes 8th June in the Date field.Ideally it should be after 12 pm. I checked the custom control but there is no code to increase the date by one day. The server time zone is UTC + 1. No custom javascript on form. Any ideas anyone!!

  • Set the datetime data after converting it in ISO8601DateTime format – Dikesh Gandhi Jun 7 '16 at 9:20
  • I dont understand how anything will change on changing the format of Date?? – Ankit Kumar Jun 7 '16 at 9:24
  • 1
    You will get some reference from here-sharepoint.stackexchange.com/questions/64639/… – Dikesh Gandhi Jun 7 '16 at 9:26
  • I am having same problem..I checked that my system time zone and SharePoint time zone are same that is (UTC-05:00) Eastern Time (US & Canada). But still date changing after 11 PM. – SP Developer Sep 2 '16 at 9:41
  • 1
    Yeah, It seems to be a known issue. I fixed it by writing custom script on my page. – Ankit Kumar Sep 2 '16 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.