Skip to content
This repository was archived by the owner on Mar 2, 2018. It is now read-only.

the datetime picker cannot update when user modifying value #217

@wqdjl

Description

@wqdjl

when i input value 2017-09-05 and reopen the datepicker ,the date picker still show the last value ;
eg.
image

I have the solution,
Please update datetime-picker.directive.ts' function ngOnChanges. when user modifying value ,you should be call setInputElDateValue、updateDatepicker
eg.

 if (!this.userModifyingValue) {
          setTimeout(() => {
            let dt = this.getDate(date);
            dt.toString = () => NguiDatetime.formatDate(dt, this.dateFormat, this.dateOnly);
            this.ngModel = dt;
            this.inputEl.value = '' + dt;
          })
  } else {
          this.setInputElDateValue(date);
          this.updateDatepicker();
 }

@jiren @lukaselmer @Krisa @boban984

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions