简体   繁体   中英

Ngx-Bootstrap Inline Datepicker Workaround

I need few suggestions/workarounds. I am having an issue on user experience of ngx-bootstrap inline datepicker.

If the user selected the date range on the same day, some user only click once. The problem is bsValueChange only emit when click twice. So when the user click the apply button on the screenshot, it applies the previous value. What i want to do is if the user did not click twice, i disable the apply button but the v5.3.0 does not have an event emitter for that situation.

Thank you

enter image description here

Hi I would suggest you add some external buttons with some predefined date ranges like in here. quick dates with buttons

Then you can just hook it to a click event and in the method you set the bsValue input to [m().subtract(0, 'days').startOf('day').toDate(), m().endOf('day').toDate()]; where m refers to momentjs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM