Closed parker789 closed 5 years ago
This indeed is a problem, would be nice to see the pull request approved!
Looks like this project hasn't seen much activity from the lead dev; we'll see what happens. I've gone and switched from this date picker in my project because of this among other issues.. but would still be nice to have this fixed for those still using!
I'm trying to create a single date picker using the
singleDatePicker = true
option and passing{ startDate: null, endDate: null }
into the model.After a quick run-through the code it seems one problem occurs during the
modelCtrl.$formatters.push()
- specifically:(opts.singleDatePicker && objValue)
evaluates totrue
withobjValue = { startDate: null, endDate: null }
. In turn the moment constructor is called with objValue as its param:moment(objValue)
..which, being ugly, is still a perfectly O.K. moment constructor, but will result in today's date.I'm not sure if there are other pieces to the code which would need to be changed, but I unfortunately don't have time to make this fix myself at the moment.