question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to change date format?

See original GitHub issue
` <label class="input">
          <input placeholder="Start Date" [(ngModel)]="date1" 
            [ngStyle]="{'background-color': isStartDateSelected}" 
            [owlDateTimeTrigger]="dt4" 
            [owlDateTime]="dt4" (dateTimeChange)="onStartDateSelect($event)">
          <owl-date-time [pickerType]="'calendar'" #dt4></owl-date-time>
  </label>`

I tried using pipe on [(ngModel)] =“date1 | date: ‘medium’” but it’s not working.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
darwin4416commented, Dec 4, 2018

any chance you are going to share with us?

For my case i used LOCALE_ID to change the date format In your app module import LOCALE_ID from angular core and in the provider array put this object {provide: LOCALE_ID, useValue: ‘en-US’ }

2reactions
macin40commented, Aug 21, 2018

@darwin4416 Please help me with this #456

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format a date the way you want - Microsoft Support
In the Format Cells box, click the Number tab. In the Category list, click Date. ... Under Type, pick a date format. Your...
Read more >
How to change Excel date format and create custom formatting
In an Excel sheet, select the cells you want to format. Press Ctrl+1 to open the Format Cells dialog. On the Number tab,...
Read more >
How to Change Date Format in Excel - Trifacta
Select the cells you want to format; Click Ctrl+1 or Command+1 ; In the “Category” menu, select “Custom”; The type you chose earlier...
Read more >
How Change Date Format & Number Format in Excel
Select the cell(s) that contain values you want to format. · Click the Number Format list arrow from the Home tab. · Select...
Read more >
How to Fix Excel Dates That Won't Change Format - Contextures
First, you'll tell Excel which format the dates are currently in. Later, after the dates are converted, you can choose a different date...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found