Hi Inzitari,
Thanks for contacting Syncfusion Support.
Yes, the change event of the DateRangePicker component triggers whenever a valid value is selected and apply button is being clicked. Please check the below code snippet to know how to make use of the change event of the DateRangePicker component and check whether the event is triggered on apply button click.
|
@Html.EJS().DateRangePicker("daterange").Width("300px").Change("onChange").Render()
<script>
function onChange(args){
//to check whether change event is triggered becuase of apply button
if (args.event && args.event.target.classList.contains("e-apply")) {
console.log("apply button clicked");
}
}
</script> |
We have also attached the sample for your convenience. Please check it.
If you rather wish to stop the pop up from closing, you can intercept it by using the close event available in Daterangepicker and can be done by setting the args.cancel as true as given below.
|
@Html.EJS().DateRangePicker("daterange").Width("300px").Change("onChange").Close("onClose").Render()
<script>
function onClose(args){
args.cancel = true;
}
</script> |
Please check the below help documents to explore more about DateRangePicker.
Please let us know if you need any further assistance.
Regards,
Deepa L.