date-time-picker
date-time-picker copied to clipboard
need to display owl date time format dd.mm.yyyy, hh:mm
Hi, i am using owl date time in angular 6 app. currently am displaying dd/mm/yyyy, hh:mm (24 hrs) format but, i want to display date dd.mm.yyyy, hh:mm format(24 hrs) format. i have been searching many sites but no luck. Can any one please help me out on this requirement.
<input matInput [owlDateTime]="fromPicker" [(ngModel)]="request.fromDateTime" [ngModelOptions]="{standalone: true}" placeholder="From Date Time" disabled (ngModelChange)="fromDateChanged()" required> <mat-icon matSuffix [owlDateTimeTrigger]="fromPicker">event <owl-date-time #fromPicker disabled="false">
Regards Nkishore
Here you go> https://stackblitz.com/github/DanielYKPan/owl-examples/tree/date-time-picker?file=src%2Fapp%2Fcustom-format%2Fcustom-format.component.ts
{provide: OWL_DATE_TIME_FORMATS, useValue: MY_CUSTOM_FORMATS}
Here you go> https://stackblitz.com/github/DanielYKPan/owl-examples/tree/date-time-picker?file=src%2Fapp%2Fcustom-format%2Fcustom-format.component.ts
{provide: OWL_DATE_TIME_FORMATS, useValue: MY_CUSTOM_FORMATS}
And then what? how do I apply it to the actual input field?
You have a great module but your instructions are very poor.
`import { DateTimeAdapter, OWL_DATE_TIME_FORMATS, OWL_DATE_TIME_LOCALE } from 'ng-pick-datetime';
export const MY_CUSTOM_FORMATS = { fullPickerInput: 'YYYY-MM-DD HH:mm:ss', parseInput: 'YYYY-MM-DD HH:mm:ss', datePickerInput: 'YYYY-MM-DD HH:mm:ss', timePickerInput: 'LT', monthYearLabel: 'MMM YYYY', dateA11yLabel: 'LL', monthYearA11yLabel: 'MMMM YYYY' };
providers: [ { provide: DateTimeAdapter, useClass: MomentDateTimeAdapter, deps: [OWL_DATE_TIME_LOCALE] }, { provide: OWL_DATE_TIME_FORMATS, useValue: MY_CUSTOM_FORMATS } ]`
That solved my issue.
Here you go> https://stackblitz.com/github/DanielYKPan/owl-examples/tree/date-time-picker?file=src%2Fapp%2Fcustom-format%2Fcustom-format.component.ts
{provide: OWL_DATE_TIME_FORMATS, useValue: MY_CUSTOM_FORMATS}
Code Not Found
Here you go> https://stackblitz.com/github/DanielYKPan/owl-examples/tree/date-time-picker?file=src%2Fapp%2Fcustom-format%2Fcustom-format.component.ts {provide: OWL_DATE_TIME_FORMATS, useValue: MY_CUSTOM_FORMATS}
Code Not Found
Here is the documentation: https://danielykpan.github.io/date-time-picker/#locale-formats
links to stackblitz are down