Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datepicker: create injectable for date formats and bundle it along with date adapter into MdNativeDateModule #4296

Merged
merged 5 commits into from
Apr 27, 2017

Conversation

mmalerba
Copy link
Contributor

No description provided.

@mmalerba mmalerba requested a review from jelbourn April 26, 2017 22:07
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 26, 2017
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -95,7 +107,8 @@ export class MdCalendar<D> implements AfterContentInit {
/** The label for the current calendar view. */
get _periodButtonText(): string {
return this._monthView ?
this._dateAdapter.getMonthYearName(this._activeDate, 'short').toLocaleUpperCase() :
this._dateAdapter.format(this._activeDate, this._dateFormats.display.monthYearLabel)
.toLocaleUpperCase() :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the upper-casing be part of what the formatter does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think either the format language used by Intl.DatetimeFormat or Moment.js gives control over the case, so we're stuck doing this

@mmalerba mmalerba merged commit 15cce9c into angular:datepicker Apr 27, 2017
@fxck
Copy link
Contributor

fxck commented Apr 29, 2017

@mmalerba anything else missing before merging into master?

@mmalerba
Copy link
Contributor Author

@fxck This was the last major feature, all I have left to do is make sure it works well on different browsers and screen readers.

@fxck
Copy link
Contributor

fxck commented Apr 29, 2017

Ok, cool. I tried c&p it into my project and fixing the paths meanwhile, looks like there are some problems with it not being rebased as well.

Property 'underlineRef' does not exist on type 'MdInputContainer'.

// edit nevermind, caused by changes to input container that are not in master

mmalerba added a commit that referenced this pull request Apr 29, 2017
…th date adapter into MdNativeDateModule (#4296)

* New module structure for DateAdapter.

* pass through format options

* move date-formats to core/datetime

* don't subclass error

* add test for missing providers case
@mmalerba
Copy link
Contributor Author

I just rebased it, give it another try

@fxck
Copy link
Contributor

fxck commented Apr 29, 2017

It wasn't the problem in the end, underlineRef currently not existing on input container on current master was. I've changed it to elementRef instead for now.

// edit

image

Got it! Almost. :D My global table styles are interfering with it.

@fxck
Copy link
Contributor

fxck commented Apr 29, 2017

@mmalerba do you have any screenshots of how the datetimepicker will look?

Got it running fine now.
image

@fxck fxck mentioned this pull request Apr 30, 2017
mmalerba added a commit that referenced this pull request May 5, 2017
…th date adapter into MdNativeDateModule (#4296)

* New module structure for DateAdapter.

* pass through format options

* move date-formats to core/datetime

* don't subclass error

* add test for missing providers case
mmalerba added a commit that referenced this pull request May 9, 2017
…th date adapter into MdNativeDateModule (#4296)

* New module structure for DateAdapter.

* pass through format options

* move date-formats to core/datetime

* don't subclass error

* add test for missing providers case
@mmalerba mmalerba deleted the dp-date-2 branch April 3, 2018 15:17
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants