This datepicker did not take more than current date or greater.
$(document).ready(function () {
var d = new Date();
var month = d.getMonth() + 1;
var day = d.getDate() - 1;
var todayDate = (month < 10 ? '0' : '') + month + '/' +
(day < 10 ? '0' : '') + day + '/' +
d.getFullYear();
$("#DOB").kendoDatePicker(
{
format: "MM/dd/yyyy",
max: new Date(todayDate)
}).attr('readonly', 'true').keypress(function (event) {
if (event.keyCode == 8) {
event.preventDefault();
};
});
});
-----------------------------------------------------------
$('#txtLoadStartTime').data("kendoTimePicker").enable(false);
$(document).ready(function () {
var d = new Date();
var month = d.getMonth() + 1;
var day = d.getDate() - 1;
var todayDate = (month < 10 ? '0' : '') + month + '/' +
(day < 10 ? '0' : '') + day + '/' +
d.getFullYear();
$("#DOB").kendoDatePicker(
{
format: "MM/dd/yyyy",
max: new Date(todayDate)
}).attr('readonly', 'true').keypress(function (event) {
if (event.keyCode == 8) {
event.preventDefault();
};
});
});
-----------------------------------------------------------
$('#txtLoadStartTime').data("kendoTimePicker").enable(false);
No comments:
Post a Comment