tamble / jquery-ui-daterangepicker

A JQuery UI based date range picker.
MIT License
184 stars 110 forks source link

#57 Fix defaultDate functionality #58

Open peterox opened 8 years ago

peterox commented 8 years ago

Fix for issue #57.

I don't believe that there is a need to set the date to null so the change should not effect any functionality.

op16 commented 8 years ago

Sorry, but it has side effects: the Close and Clear actions keep the default date unchanged (the previous start of range).

peterox commented 8 years ago

I don't understand what you mean. Can you please better explain what is broken because of this change.

op16 commented 8 years ago
  1. comment out your customization of beforeShowDay() (not sure if this step is necessary, just to make sure you are seeing what I'm seeing)
  2. select a range and press Apply
  3. open the picker again and press Clear
  4. open the picker again and notice the previous start of range looks different with your fix (because it is marked as current-day)