date-time-picker icon indicating copy to clipboard operation
date-time-picker copied to clipboard

need to display owl date time format dd.mm.yyyy, hh:mm

Open ghost opened this issue 6 years ago • 7 comments

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

ghost avatar Dec 27 '18 13:12 ghost

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}

JohnnyTMD avatar Apr 22 '19 11:04 JohnnyTMD

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.

raynoppe avatar Aug 23 '19 11:08 raynoppe

`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.

JohnnyTMD avatar Aug 23 '19 11:08 JohnnyTMD

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

dinumarathe avatar Oct 01 '19 09:10 dinumarathe

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

Ghostbird avatar Jan 14 '20 11:01 Ghostbird

links to stackblitz are down

Quethzel avatar Sep 30 '20 16:09 Quethzel