elclanrs / jq-idealforms-old

The ultimate framework for building and validating responsive HTML5 forms.
665 stars 95 forks source link

make jquery-ui optional, and check if datepicker is present #136

Open flocsy opened 11 years ago

flocsy commented 11 years ago

The description states "Load jQuery UI for datepicker support", this suggests that if I don't use datepicker, then I don't need jquery-ui. Unfortunatelly this is not the case, as in init it uses e.datepicker, but it only checks if jQuery.ui exists:

jQuery.ui && (e.datepicker._checkOffset

We have an optimized (not full) version of the datepicker for autocomplete, that doesn't include datepicker, so the code fails. An easy fix for this in that particular place is:

jQuery.ui && e.datepicker && (e.datepicker._checkOffset

but I can imagine that the same problem can appear in another places. As many people now download only the modules they really use in jquery-ui I would consider this to be a bug.

elclanrs commented 11 years ago

Will look into this...Thanks for reporting.