spongessuck / gm.datepickerMultiSelect

AngularJS module to extend UI Bootstrap's Datepicker directive to allow for multiple date selections.
MIT License
73 stars 41 forks source link

Issue on change selection type #17

Closed szumszym closed 9 years ago

szumszym commented 9 years ago

When 'range' type is selected:

  1. double click on the same date (e.g. range: 2015-07-06 - 2015-07-06)
  2. change selection type to 'individual' the following error occurs:
Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: d in app.selectedDates | orderBy : app.identity, Duplicate key: number:1436133600000, Duplicate value: 1436133600000

btw: would it possible to change behavior after second click on the same date to unselect the date (as it is for 'individual' type) ?

spongessuck commented 9 years ago

Fixed in latest commit, released as v1.0.6. I just made it so selecting the same date again restarts the selection.

szumszym commented 9 years ago

great! thanks man