angular-moment-picker icon indicating copy to clipboard operation
angular-moment-picker copied to clipboard

I cant update my moment picker from controller side

Open yunusemreuveyik opened this issue 5 years ago • 1 comments

I am trying to update the moment picker value from controller by updating the model but its not working. here is my codes:

<div class="input-group"
                                         moment-picker="model.checkInDate"
                                         min-date="model.minCheckInDate"
                                         change="changeDate()"
                                         locale="{{$root.language}}"
                                         format="LL">

                                        <input class="form-control"
                                               placeholder="Select a date"
                                               ng-model="model.checkInDate"
                                               ng-model-options="{ updateOn: 'blur' }"
                                               autocomplete="off">
                                    </div>

js:

$scope.model.checkInDate = (some valid date)

yunusemreuveyik avatar Feb 08 '20 11:02 yunusemreuveyik

Hi @yunusemreuveyik, I recently had the same issue where a duplicated datepicker was created when the model value is changed, I came across this => https://stackoverflow.com/questions/43558005/date-format-issue-in-angular-moment-picker-library Try changing the attribute for moment-picker and ng-model. It fixed my issue.

ShadiyaIffath avatar Feb 27 '20 10:02 ShadiyaIffath