KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am making a hotel reservation system i have to disable past dates in jQuery UI datepicker here's the code calling in .cs public class CheckLookup { [DataType(DataType.Date)] public DateTime checkindate { get; set; } [DataType(DataType.Date)] public DateTime checkoutdate { get; set; } } Here's the javascript $(document).ready(function () { function getDateYymmdd(value) { if (value == null) return null; return $.datepicker.parseDate("yy-mm-dd", value); } $('.date').each(function () { var minDdate = getDateYymmdd($(this).data("")); var maxDate = getDateYymmdd($(this).data("val-rangedate-max")); $(this).datepicker({ dateFormat: "dd-mm-yy", minDate: minDate, maxDate: maxDate }); }); }); tell me the modification to be done in this code.
Tags (comma-separated)
Save Edits
Cancel