Skip to content

Date is not displayed on the input field with angular-mydatepicker #108

@hemanth281

Description

@hemanth281

When using ngx-mydatepicker, I was able to display the date( for ex: 01/13/2022) on the input field. But when I upgraded to angular-mydatepicker with angular 11, the date is not displayed on the input field. However, placeholder mm/dd/yyyy is getting displayed instead of actual date( for ex: 01/13/2022). If you see the code below dateModel variable holds the date with ngModel data-binding, I would expect to display the date on input field.

Code:
<input type="text" maxlength="10" placeholder="mm/dd/yyyy" cbsRestrict restrictionType="dateFormat" class="form-control form-control-sm input-calender" angular-mydatepicker name="mydate"
[(ngModel)]="dateModel" [options]="myDatePickerOptions" #dp="angular-mydatepicker" (inputFieldChanged)="onInputFieldChanged($event)"
[attr.disabled]="disabled?'':null" (dateChanged)="onDateChanged($event)"/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions