Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timepicker can't change nzDisabledHours attribute dynamically #286

Closed
mraiguo opened this issue Sep 13, 2017 · 2 comments
Closed

timepicker can't change nzDisabledHours attribute dynamically #286

mraiguo opened this issue Sep 13, 2017 · 2 comments

Comments

@mraiguo
Copy link

mraiguo commented Sep 13, 2017

I'm submitting a...


[ ] Bug report  
## Current code


《nz-timepicker 
      [nzDisabledHours]="disableHours"
      formControlName="start_time" 
       [nzFormat]="'HH:mm'">
《button (click)="changeDisableHours()">确定

// 开始时默认的不能点击的小时时间 disableHours = () => { return this.newArray(1,10); }; // 点击按钮后,改变的小时时间 changeDisableHours() { this.disableHours = () => { return this.newArray(1,20); } } ## Expected behavior 当我点击button的时候,通过changeDisableHours方法我改变了disableHours输出的array, 这时我希望time-picker里面的disableHours也随之改变 ## Environment

Angular version: 4.3.2

ng-zorro-antd version: ^0.5.0-rc.4

Browser:
- [ ] Chrome (desktop) version XX


For Tooling issues:
- Node version: v8.4.0 
- Platform:  mac
@wilsoncook
Copy link
Member

AFAIK, the disabled status only initialized at nz-timepicker's ngOnInit life cycle, that's to say, the ui will not re-rendered while settled once.

@lock
Copy link

lock bot commented Feb 18, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants