Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Preset date ranges not working with JQuery UI 1.10.1 #30

Closed
pgerzani opened this issue Apr 3, 2013 · 1 comment
Closed

Preset date ranges not working with JQuery UI 1.10.1 #30

pgerzani opened this issue Apr 3, 2013 · 1 comment

Comments

@pgerzani
Copy link

pgerzani commented Apr 3, 2013

I encountered an issue where after upgrading to the latest version of the Date Range Picker and JQuery UI 1.10, the preset date ranges did not change when selected.

I was able to resolve this via this simple change on lines 269 and 270:

old:

            rp.find('.range-start').datepicker('setDate', dateStart).find('.ui-datepicker-current-day').trigger('click');
            rp.find('.range-end').datepicker('setDate', dateEnd).find('.ui-datepicker-current-day').trigger('click');

new:

            rp.find('.range-start').datepicker('setDate', new Date(dateStart)).find('.ui-datepicker-current-day').trigger('click');
            rp.find('.range-end').datepicker('setDate', new Date(dateEnd)).find('.ui-datepicker-current-day').trigger('click');

I checked the API documentation and the DatePicker.setDate function appears to never have accepted the long integer version, so perhaps the JQuery UI team made a change recently that broke this assumption?

Anyway, hope it is helpful. Your widget has been really useful to me.

@jefflembeck
Copy link
Collaborator

Retiring this project.

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants