The specified value "07/24/2020" does not conform to the required format, "yyyy-MM-dd". angular

Viewed 3530

Hi Guys I am using bsdatepicker input type = "date" this is my requirement, while i am clicking on dates on calendar I am facing this issue

The specified value "07/24/2020" does not conform to the required format, "yyyy-MM-dd".

1 Answers

Looking at the example you've given, your date format seems to be "MM/dd/yyyy" You can specify that in the [bsConfig] attribute of the datepicker

<input
    class="form-control"
    bsDatepicker
    [bsConfig]="{ dateInputFormat: 'MM/DD/YYYY' }">
</div>
Related