I'm adding a little extra logic to the daterangepicker ( http://www.daterangepicker.com/ ). I have some simple code to the start date when a dropdown is selected.
The date does seem to change in the background, but only becomes visible when I close the picker and open it again. I'd rather the dates update immediately. Any idea if there's a way to "refresh" the shown dates to match when setStartDate
is called?
So I found a way, looking through the functions available. You can call the "updateView()" method to have the view change as needed. Sorted.
$('input[name="daterange"]').data('daterangepicker').updateView();
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.