Skip to content

ng-model-options {timezone: 'utc'} with min-date a utc moment doesn't work. #58

@tw1nk

Description

@tw1nk

If your local timezone differs from UTC and the input is required the ng-model will be invalid.

<input required mdc-datetime-picker=""
                                date="true" time="true" type="text"
                                placeholder="Start Date/time of reschedule"
                                ng-model="vm.selectedItem.start"
                                seconds="true" minute-steps="1"
                                class="md-input" id="input_0"
                                format="YYYY-MM-DD HH:mm z"
                                min-date="vm.minDate"
                                ng-model-options="{timezone: 'utc'}"
                                >```

I'm using v1.18.2 where the ng-model actually works with setting the form status correctly.

Sure, i could update to the latest version where the ng-model doesn't work however that breaks a lot of other things as I want the form to be invalid if input to the form is invalid.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions