bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Support ng-model-options with datepicker

Open wesleycho opened this issue 11 years ago • 27 comments

We should support ng-model-options with the datepicker

In particular, we should support

  • [x] allowInvalid
  • [x] updateOn
  • [x] timezone

wesleycho avatar Nov 07 '15 17:11 wesleycho

I took an investigation into implementing getterSetter, but came across a fundamental flaw with it given that we are allowing setting ng-model-options through alternative means, so we are feature complete as far as ng-model-options support goes for the datepicker.

wesleycho avatar Jun 13 '16 22:06 wesleycho

@wesleycho

"fundamental flaw with it given that we are allowing setting ng-model-options through alternative means, so we are feature complete as far as ng-model-options support goes for the datepicker."

What does that mean? Did getterSetter ever make it to 2.0?

Thanks

aplocher avatar Jul 26 '16 03:07 aplocher

It seems to work now, but users can only type into the text field if I also include "updateOn:Blur". e.g. ng-model-options="{ getterSetter: true, updateOn: 'blur' }" - otherwise partially typed dates won't work. Thanks! :smile:

aplocher avatar Jul 26 '16 03:07 aplocher

@wald-tq the provided solution doesn't work for me :( , Any guess?

pankajparkar avatar Aug 11 '16 10:08 pankajparkar

@pankajparkar : I am still using 1.2.x of angular-bootstrap. That's my only guess I with that much information.

wald-tq avatar Aug 11 '16 10:08 wald-tq

@wald-tq That's correct guess, I'm using 0.13.4 version. Any workaround for 0.13.X version?

pankajparkar avatar Aug 11 '16 11:08 pankajparkar

@pankajparkar I can't help you. Consider a upgrade.

wald-tq avatar Aug 11 '16 11:08 wald-tq