Using a plugin for a project. I want to disable older dates from today. (User can not select old dates) My JS:
datePickerController.createDatePicker ({formElements: {"inp1": "D-DS-M" -DS-Y "}} ); In the manual: Both objects accept the object which represents date or date ranges to disable. I have so far Could not disable old days with trial and error. Can you show me a way to do this? Thanks in advance
Edit:
datePickerController.setRangeLow ("myElementID", $ Today); datePickerController.setRangeHigh ("myElementID", $ old_dayes); I want to set a dynamic date in ("myElementID", "20081201") . Date ranges: $ today and $ Old_days = '$ old dates from today'
to (note: this is your Linked By!)
Limit Date Selection ie Setting Date Range
DatePicker lets you select a date A low and upper limit enables to define both.
To add a lower or upper limit, simply add the parameter "rangeHigh" and / or "rangeLow" to the initial object and set its value to a YYYYMMDD date format; For example, the following code will limit date selection from 13/03/1970 to 20/12/1999:
var opts = {formElements: {"inp1": "D-SL-M-SL-Y"}, // Set the range limit of 13/03/1970: "19700313", set // Higher of a category 20/12/2009 Class High: " 20091220 "}; DatePickerController.createDatePicker (opts); For those who are not ready to scroll (just one line in Doku) ...
Dateline form dynamically Setting from
The program can be set by calling the upper and lower date ranges also by calling the following two methods:
// date 01/12 Set the lower border to 2008 / PickerController .setRangeLow ("myElementID", "20,081,201"); Set // Upper limit to be 01/12/2009 DatePickerController.setRangeHigh ("myElementID", "20091201"); Edit:
html:
& lt; Input type = "text" id = "datepicker" /> Javascript:
var today = new date (); Var option = {formElements: {"datepicker": "D-SL-M-SL-Y"}, Bring Category: Today.Gatefulair () + Today. Gatemonth () + Today .getDay (),}; DatePickerController.createDatePicker (option);
Comments
Post a Comment