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" />

Comments

Popular posts from this blog

How to Customize exported excel's cell background color in Datatables

Populate dropdown using jquery ajax in SharePoint

Customizing SharePoint list and implementing Quick search using jQuery