ionic-framework: Datetime week days not displaying properly

Ionic version: (check one with “x”) [ ] 1.x [x ] 2.x

I’m submitting a … (check one with “x”) [x ] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior: Checking the examples under http://ionicframework.com/docs/v2/api/components/datetime/DateTime/

The one with Chrome Wednesday Dec 31 is blank and in the same manner, when I try to display dates using the pickerformat='DDDD', only numerals show.

Expected behavior: <ion-datetime displayFormat="DDDD" pickerFormat="DDDD" min="2016-08-22" max="2016-08-28" [(ngModel)]="weekdays"></ion-datetime> should show picker days in full name. Monday, Tuesday, Wednesday…Sunday

Steps to reproduce:

Check picker of Chrome Wednesday Dec 31 in http://ionicframework.com/docs/v2/api/components/datetime/DateTime/

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 17 (2 by maintainers)

Most upvoted comments

image

These options perform that bug: image

Sample: http://plnkr.co/edit/CMlB2rztu1K1lRtBY31z

I found this in the code:

// does not support selecting by day name
// automaticallly remove any day name formats
template = template.replace('DDDD', '{~}').replace('DDD', '{~}');

Why?

Yeah, I’ve just experienced this one too. If you check into the source code of the component, you’ll see it explicitly state it doesn’t work.

// does not support selecting by day name
// automaticallly remove any day name formats
template = template.replace('DDDD', '{~}').replace('DDD', '{~}');

Suggest the docs are updated to remove the non-working case from the demo in the interim.

In the meantime, if anyone has any alternatives, please share. I’m trying to make a date time picker similar to the on in the iOS calendar application “DDD DD MMM YY, HH, mm”. Struggling so far 😃

I have the same issue with the ion-datetime. The problem is pickerFormat, not the displayFormat. Some news about this issue?