Skip to content

Commit

Permalink
ENHANCEMENT Enforcing min/max config on DateField in jQuery date pick…
Browse files Browse the repository at this point in the history
…er (AIR-93)
  • Loading branch information
chillu committed Oct 7, 2011
1 parent 7c147fe commit b05e3bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions javascript/DateField.js
Expand Up @@ -16,6 +16,9 @@
config = $.extend(config, $.datepicker.regional[config.locale], {}); config = $.extend(config, $.datepicker.regional[config.locale], {});
} }


if(config.min) config.minDate = $.datepicker.parseDate('yy-mm-dd', config.min);
if(config.max) config.maxDate = $.datepicker.parseDate('yy-mm-dd', config.max);

// Initialize and open a datepicker // Initialize and open a datepicker
// live() doesn't have "onmatch", and jQuery.entwine is a bit too heavyweight for this, so we need to do this onclick. // live() doesn't have "onmatch", and jQuery.entwine is a bit too heavyweight for this, so we need to do this onclick.
config.dateFormat = config.jqueryDateformat; config.dateFormat = config.jqueryDateformat;
Expand Down

0 comments on commit b05e3bd

Please sign in to comment.