Permalink
Browse files

ENHANCEMENT Enforcing min/max config on DateField in jQuery date pick…

…er (AIR-93)
  • Loading branch information...
1 parent 7c147fe commit b05e3bd89043191df0ef82705fdb58007fdb5d93 @chillu chillu committed Sep 26, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 javascript/DateField.js
View
@@ -16,6 +16,9 @@
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
// 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;

0 comments on commit b05e3bd

Please sign in to comment.