Open Closed

bsDatePicker with Moment format #8448


0
sophoana created

Hello support,

I want to use moment format with bsdatepicker. When format 01-04-2020 it show 01-Feb-2004 while use [bsConfig]="{ dateInputFormat: 'DD-MMM-YYYY' }". But when use Date format that it good 01-Feb-2020.

I want to show like this:

image.png

HTML Code:

<input
     id="GeneralJournalDate"
     type="text"
     #GeneralJournalDate
     name="GeneralJournalDate"
     class="form-control"
     bsDatepicker
     [bsConfig]="{ dateInputFormat: 'DD-MMM-YYYY' }"
     [(ngModel)]="generalJournal.date">

1 Answer(s)