Vaadin-date-picker使用Angular2动态设置默认日期



我正在尝试使用Angular2在vaadin-date-picker中动态设置默认日期。在我的项目中执行这些任务时,它显示了一个异常。

My code and Error的PFA

谢谢。

点击获取例外图像:例外图像
点击获取代码ImageCode图像

答案在这里:https://vaadin.com/forum#!/线程/13790736

感谢
    pad(i: number) {
  return i < 10 ? '0' + i : i;
}
ngOnInit() {
  const selectedDate = new Date();
  this.birthday = `${selectedDate.getFullYear()}-${this.pad(selectedDate.getMonth() + 1)}-${this.pad(selectedDate.getDate())}`;
}

最新更新