We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Apply click event on Daterangepicker

In Data range picker after selecting the date ranges, we need "apply" button control/button click event.
so that we can call/display the dynamic data.

Is it possible? if apply button click event available, could please share an example?



2 Replies

SD Sourangsu Dasgupta May 4, 2023 04:53 AM UTC

Please let know, if this is possible and if we have hook to write custom code on apply click



MR Mallesh Ravi Chandran Syncfusion Team May 7, 2023 06:32 AM UTC

Hi Sourangsu,

We are glad to inform you that it is possible to add an "apply" button control and attach an event listener to it in the DateRangePicker . We have prepared a sample that demonstrates how to implement this functionality.

open: function () {

   setTimeout(

     function () {

       this.popupWrapper

         .querySelector('.e-apply')

         .addEventListener('click', function () {

           console.log('Apply button clicked');

         });

     }.bind(this)

   );

 }

 

Sample :  https://stackblitz.com/edit/r5cc51-anc8e6?file=index.js

Regards,

Mallesh 



Loader.
Live Chat Icon For mobile
Up arrow icon