ng-pick-datetime必须在选择日期时关闭

时间:2019-05-06 19:58:21

标签: angular7 typescript2.0

我是使用ng-pick-datetime的新手,所以我想知道选择日期时是否可以关闭对话框,而我不必单击“设置”按钮即可关闭该对话框对话框。

我阅读了此特定解决方案:

<owl-date-time #mydatepicker [(ngModel)]="model" (ngModelChange)='mydatepicker.hide()' >
</owl-date-time>

此解决方案在正常形式上是正确的,但我使用的是反应形式。

依赖项:

  "dependencies": {
    "@angular/animations": "^7.2.14",
    "@angular/cdk": "^7.3.7",
    "@angular/common": "^7.2.14",
    "@angular/compiler": "^7.2.14",
    "@angular/core": "^7.2.14",
    "@angular/flex-layout": "^7.0.0-beta.24",
    "@angular/forms": "^7.2.14",
    "@angular/material": "^7.3.7",
    "@angular/platform-browser": "^7.2.14",
    "@angular/platform-browser-dynamic": "^7.2.14",
    "@angular/router": "^7.2.14",
    "@ng-bootstrap/ng-bootstrap": "^4.1.1",
    "@ng-select/ng-select": "^2.18.0",
    "angular-epic-spinners": "^2.0.0",
    "angular-popper": "^2.0.1",
    "bootstrap": "^4.2.1",
    "core-js": "^2.5.4",
    "g": "^2.0.1",
    "hammerjs": "^2.0.8",
    "jquery": "^3.4.0",
    "moment": "^2.24.0",
    "ng-pick-datetime": "^7.0.0",
    "ng-pick-datetime-moment": "^1.0.8",
    "ng-sidebar": "^8.0.0",
    "ngx-bootstrap": "^4.1.1",
    "ngx-spinner": "^7.1.4",
    "popper.js": "^1.15.0",
    "rxjs": "~6.3.3",
    "tar": "^4.4.8",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.8",
    "@angular/cli": "^7.3.8",
    "@angular/compiler-cli": "^7.2.14",
    "@angular/language-service": "^7.2.14",
    "@fortawesome/fontawesome-free": "^5.8.1",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/jquery": "^3.3.29",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.2.2"
  }
}
<input class="form-control overflow-box" placeholder="dd/mm/yyyy hh:mi" formControlName="fechaHasta" [owlDateTimeTrigger]="dt2" [owlDateTime]="dt2">
<owl-date-time #dt2></owl-date-time>

目前,我正在使用通用关闭对话框(单击“设置”按钮)来设置日期。

0 个答案:

没有答案