silverskater / jQuery-UI-Datepicker-MonthYearPicker-Addon

Month and year picker addon for the jQuery UI Datepicker. A considerable UX improvement compared to the month and year dropdowns.
12 stars 10 forks source link

Next button hide ui-state-hover #18

Open Daijobou opened 7 years ago

Daijobou commented 7 years ago

I found a issue in demo/source.

First:

  1. Open demo in browser
  2. Click in header on "May 17"
  3. Click in header on "2017"
  4. Click on next or prev buttons
  5. Move cursor hover years

Result: Selection (ui-state-hover) is missing, but click on a year working.

Second: I use a range with two datapicker, so I edit your demo a little

<input type="text" id="fromDate" value=""> <input type="text" id="toDate" value="">

<script>
$(function()
{
    $('#fromDate').datepicker({
        onClose: function( selectedDate, inst ) {
            $('#toDate').datepicker('option', 'minDate', selectedDate);
        }
    });
    $('#toDate').datepicker({
        onClose: function( selectedDate, inst ) {
            //$('#fromDate').datepicker('option', 'maxDate', selectedDate);
        }
    });
});
</script>

With command $('#toDate').datepicker('option', 'minDate', selectedDate) I get now the same issue with months for toDate, when I set first fromDate.

  1. Set a date in fromDate input
  2. Click in toDate input
  3. Click in header on "May 17"
  4. Click on next or prev buttons
  5. Move cursor hover months

Result: Selection (ui-state-hover) is missing, but click on a month working in demo.

In my project click on items was not have a ui-state-hover redirect to start page, because I use HTML base tag.