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.

Header dateFormat doesn't apply to HEADER_ITEMS.DATE

See original GitHub issue

Hi,

I configured my header with clock on left side an date on right side, see code below:

header: { // https://github.com/resoai/TileBoard/wiki/Header-configuration
    styles: {
      padding: '10px 130px 0',
      fontSize: '48px'
    },
    right: [
      {
        type: HEADER_ITEMS.DATE,
        dateFormat: 'EEEE, d. MMMM', //https://docs.angularjs.org/api/ng/filter/date
      }
    ],
    left: [
      {
        type: HEADER_ITEMS.TIME,
      }
    ]
  },

For this configuration date should be Monday, 7. January, but it shows as the default Monday, January 07.

image

When I switch to HEADER_ITEMS.DATETIME it is applyed correct:

header: { // https://github.com/resoai/TileBoard/wiki/Header-configuration
    styles: {
      padding: '10px 130px 0',
      fontSize: '48px'
    },
    right: [
      {
        type: HEADER_ITEMS.DATETIME,
        dateFormat: 'EEEE, d. MMMM', //https://docs.angularjs.org/api/ng/filter/date
      }
    ],
    left: [
      {
        type: HEADER_ITEMS.TIME,
      }
    ]
  },

image (please ignor that shitty layout with datetime, it’s caused by my css config)

Second, not issue related question, is it possible to change language of date / datetime ? I would like to use it in german…

Thanks in advance 😃

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
rchlcommented, May 3, 2021

Please see the locale option. It’s documented in the readme.

1reaction
resoaicommented, Jan 7, 2019

For HEADER_ITEMS.DATE you need to specify format and not dateFormat. You can localise Angular by including this file:

<script src="includes/angular-locale_de-de.js"></script>

https://github.com/angular/bower-angular-i18n/blob/master/angular-locale_de-de.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I change the Date Format in Header
Open the Format Cells Dialogue Box by right clicking in the selection and choosing Format Cells. Select the Number tab, and Custom. In...
Read more >
How to specify date or datetime format in header or footer?
Specify date or date time format in header or footer with VBA code. 2. Hold down the ALT + F11 keys in Excel...
Read more >
Specifying Date Formats in Headers - Microsoft Excel Tips
Normally, the dates used by Excel in headers and footers (with the [DATE] code) are based on the regional settings controlled by Windows....
Read more >
Excel Date - 2 digit year appearing as 3 digits - Stack Overflow
It is Date formatted & a header of a table. The other date header items are formatted the same but have the option...
Read more >
Are Excel table headers always converted to text? - Super User
... the Table's header to a date it can use, creates the values that should go into the added columns' headers, formats them...
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