Bhubaneswar, Odisha, India
+91-8328865778
support@softchief.com

Trigger onchange event of DateTime field in power pages /power portal using JQuery

Trigger onchange event of DateTime field in power pages /power portal using JQuery

Handling change event in jQuery for Date Time fields is not straight forward like normal text fields. Use following method to handle onchange.

$(document).ready(function(){

    //run onchange of appointment date
    var dpcontrol = $('#lifeline_appointmentdate_datepicker_description').parent().parent();
    $(dpcontrol).on("dp.change", function (e) {

        alert("The selected date is " + e.date);
    });

});

Hope this helps.