|
var currentDate = new Date(selectedYear, selectedMonth, selectedDay); |
When you are located in different country and get the GMT of the zone, the selected date is one day before if there is no time set.
This line has made my day:
var currentDate = new Date(Date.UTC(selectedYear, selectedMonth, selectedDay));