Hi
My problem is similar to this support issue https://support.aspnetzero.com/QA/Questions/4328
The links inside the above support case does not work.
The issue i am having is in a modal dialog.
Here is my UI for the datetime picketr
<input class="form-control" type="datetime" [(selectedDate)]="showVar.showDate" #Show_ShowDate id="Show_ShowDate" name="Show_ShowDate" required>
In the edit mode the datetime picker control is empty instead of showing the model value.
Any reason why?
Thanks
2 Answer(s)
-
0
Hi @kumaran
- Are you using latest version of AspNet Zero ?
- Is your page generated with RAD Tool ? If so, what is your RAD Tool version ?
Thanks,
-
0
Hi
I am using v5.5.0.0 and i am showing these dates in a modal window. This was not created by rad tool.
By the way i was able to fix it by doing the following.
Point me to the right direction to upgrade the code to the latest version because the code has been customized a lot in the project. Don't want to mess the existing code.
Thanks.
In the html i had the following .. <input class="form-control" type="datetime" #Show_ShowDate id="Show_ShowDate" name="Show_ShowDate" required>
In the typescript i had
ngAfterViewInit(): void { ..
// default date picker $(this.Show_ShowDate.nativeElement).datetimepicker({ locale: abp.localization.currentLanguage.name, format: 'L LT' });
}
When i show the modal window, to load the data from the db, ..
let startDateTime: Element = document.getElementById("Show_ShowDate"); if (startDateTime) { (startDateTime as HTMLInputElement).defaultValue = moment(this.showVar.showDate).format('L LT'); }