动态min和max属性未采用ionic2'datetime-local'类型。
<ion-input value="" type="datetime-local" [formControl]="expdate" [attr.min]="mindate" [attr.max]="maxdate"></ion-input>
export class CollectMoneyPage{
mindate:any;
maxdate:any;
constructor(){
this.maxdate = new Date().toISOString().slice(0,-5);
this.mindate = new Date().toISOString().slice(0,-5);
}
}
但它在以下方面运作良好,
<ion-input value="" type="datetime-local" [formControl]="expdate" min="2016-12-21T02:44:14" max="2016-12-21T02:44:14"></ion-input>
答案 0 :(得分:0)
不确定datetime-local是否是有效的离子输入类型。 试试:
constructor(props) {
super(props)
// set state with passed in props
this.state = {
message: props.error,
hide: props.hide,
animating: props.animating
}
}
render() {
if(this.state.animating){
return(
<ActivityIndicator
animating={true}
size="small"
/>
)
}else{
return(
<View>
</View>
)
}
}
更多here