DanielYKPan / date-range-picker

Angular Date Range Picker

Home Page:https://danielykpan.github.io/date-range-picker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(dateRangeChange) does not fire when using the shortcut buttons

jessenic opened this issue · comments

(dateRangeChange) does not fire when using the "This week", "Last week" etc shortcuts. It does fire when manually selecting dates. Using Angular 4 and Chrome.

Also [(dateRange)] does not change either. This is visible in the demo too: https://danielykpan.github.io/date-range-picker/

The From/To texts do not change when using the shortcut buttons.

commented

Hi, to trigger the return of the date object from : xxx to: xxx just add << this.dateRangeChange.emit(Object.assign({}, this.datePick)); >> at the end of each case scenario on the switch(range) case :'tm', case 'lm' etc etc

Cheers