Feature Request: Date pipe - Support narrow form for weekdays in #12294

Closed
JohnKis opened this Issue Oct 14, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@JohnKis

JohnKis commented Oct 14, 2016

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[X] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
With the current implementation of the date pipe, It's not possible to render weekdays in narrow form (M, T, W, T, F, S, S).

Expected behavior
It would be useful to be able to render weekdays in narrow form.

What is the motivation / use case for changing the behavior?
Date pickers often use the narrow format to display the days of the week. At the moment if you want to achieve this, you need to create an Intl.DateTimeFormatter in your component, and pass the weekdays as a string. It'd be more ideal to use actual dates and the date pipe in the template. Since it's supported by the JS INTL API, I imagine that it should be a trivial change. As for the format string, I feel that 'EE' should be appropriate here.

Please tell us about your environment:
macOS Sierra, NPM 3.10.3

  • Angular version: 2.0.1
  • Browser: all
  • Language: all
  • Node (for AoT issues): node --version = v6.3.0
@laskoviymishka

This comment has been minimized.

Show comment
Hide comment
@laskoviymishka

laskoviymishka Oct 14, 2016

Contributor

Yep, missed this one. Since it supported by Intl.API it should not be really hard to change

Contributor

laskoviymishka commented Oct 14, 2016

Yep, missed this one. Since it supported by Intl.API it should not be really hard to change

laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016

laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016

laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016

laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016

laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016

laskoviymishka added a commit to laskoviymishka/angular that referenced this issue Oct 14, 2016

@alxhub alxhub closed this in #12297 Oct 19, 2016

alxhub added a commit that referenced this issue Oct 19, 2016

btrigueiro added a commit to btrigueiro/angular that referenced this issue Oct 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment