I'm trying to set a default date dynamically in vaadin-date-picker using Angular2. While implementing these task on my project it shows an exception.
PFA of My code and Error
Thank you.
Click for exception image: Exception Image
Click for code ImageCode Image
Answer is here : https://vaadin.com/forum#!/thread/13790736
Thanks
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())}`;
}