Start and End Date in SharePoint forms using jQuery
How to use Start and End Date in SharePoint forms using jQuery
$(document).ready(function(){
$("#txtFromDate").datepicker({
numberOfMonths: 2,
dateFormat: 'dd/mm/yy',
changeMonth: true,
changeYear: true,
onSelect: function(selected) {
$("#txtToDate").datepicker("option","minDate", selected)
}
});
$("#txtToDate").datepicker({
numberOfMonths: 2,
dateFormat: 'dd/mm/yy',
changeMonth: true,
changeYear: true,
onSelect: function(selected) {
$("#txtFromDate").datepicker("option","maxDate", selected)
}
});
});
HTML:-
From: <input type="text" id="txtFromDate" />
To: <input type="text" id="txtToDate" />
$(document).ready(function(){
$("#txtFromDate").datepicker({
numberOfMonths: 2,
dateFormat: 'dd/mm/yy',
changeMonth: true,
changeYear: true,
onSelect: function(selected) {
$("#txtToDate").datepicker("option","minDate", selected)
}
});
$("#txtToDate").datepicker({
numberOfMonths: 2,
dateFormat: 'dd/mm/yy',
changeMonth: true,
changeYear: true,
onSelect: function(selected) {
$("#txtFromDate").datepicker("option","maxDate", selected)
}
});
});
HTML:-
From: <input type="text" id="txtFromDate" />
To: <input type="text" id="txtToDate" />
Comments
Post a Comment