Skip to content
Browse files

Aligning year selector to use zero indexed months

When using a year selector, the datepicker will return February of the selected year due to the fact that the JavaScript Date object's `month` value is zero index based. Updating the value passed here will direct the `select_date` function to pass the correct `month` value to the Date object.
  • Loading branch information...
duckboy81 committed May 1, 2019
1 parent 94d0a79 commit 711bf96de41d8de6e683a5ab8b30931b5a98c100
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/zebra_datepicker.src.js
@@ -1551,7 +1551,7 @@
if ($.inArray('months', views) === -1)

// put selected date in the element the plugin is attached to, and hide the date picker
select_date(selected_year, 1, 1, 'years', $(this));
select_date(selected_year, 0, 1, 'years', $(this));

else {

0 comments on commit 711bf96

Please sign in to comment.
You can’t perform that action at this time.