You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the calendar plugin tries to read the dates there are in the $scope.events, the calendar displays a day before (if in the $scope.events have de date 12/04, the calendar displays the event on 11/04). Apparently, the calendar is reading the date in a wrong way, because when I click in the day with a event and print de date parameter that cames in the dateClick function, it shows that have GMT -3 (Tue Apr 12 2016 21:00:00 GMT-0300 (Local Standard Time)) and I dunno from where it cames. How I take off this GMT and from where I should take it off?
The text was updated successfully, but these errors were encountered:
The solution is simple - pass the entire date/moment in the event.date field, for example
Tue Sep 13 2016 00:00:00 GMT-0400 (Eastern Daylight Time)
When you give a date in the format as suggested "2016-09-13" the existing code treats it as UTC and then converts it to your local timezone. So for eastern which is -4, it would treat this as 2016-09-12 20:00:00. This is what is marking it 1 day before the date in the event array.
I originally just added one day to the date, a suggestion in a previous comment. This caused a problem for my users in timezones before UTC, like Germany. Then I put a hack in that checked their timezone and only added 1 day if the utcOffSet < 0. This started not working for certain android version, handsets.
When the calendar plugin tries to read the dates there are in the $scope.events, the calendar displays a day before (if in the $scope.events have de date 12/04, the calendar displays the event on 11/04). Apparently, the calendar is reading the date in a wrong way, because when I click in the day with a event and print de date parameter that cames in the dateClick function, it shows that have GMT -3 (Tue Apr 12 2016 21:00:00 GMT-0300 (Local Standard Time)) and I dunno from where it cames. How I take off this GMT and from where I should take it off?
The text was updated successfully, but these errors were encountered: