Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(datepicker): support HTML5 input types #3499

Closed

Conversation

chrisirhc
Copy link
Contributor

  • Add support for other HTML5 input types such as month and datetime-local

Fixes #3312

Demo of this:
http://plnkr.co/edit/eBtCPhNa7S1MnPbUY70a?p=preview

@chrisirhc chrisirhc added this to the 0.13.0 milestone Apr 6, 2015

// Inner change
scope.dateSelection = function(dt) {
if (angular.isDefined(dt)) {
scope.date = dt;
}
if (dateFormat) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does removing this not break anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm.. Good point, the directive should throw an Error immediately if dateFormat is falsey. It's undefined behavior and definitely an error in the use of this directive.

As above the dateFormat would always fall back to datepickerPopupConfig.datepickerPopup . However, if datepickerPopupConfig.datepickerPopup is somehow overridden to a falsey value, this method should fail immediately. There should be no reason to leave the date format unspecified.

@chrisirhc chrisirhc force-pushed the feature/datepicker-type-date branch from 3b2d158 to 736d464 Compare April 8, 2015 07:14
@chrisirhc chrisirhc force-pushed the feature/datepicker-type-date branch from 736d464 to 192688d Compare April 14, 2015 06:22
@chrisirhc chrisirhc closed this in 8facf60 Apr 14, 2015
@wesleycho wesleycho reopened this Apr 14, 2015
@wesleycho
Copy link
Contributor

Closed by accident, reverted my commit.

@wesleycho
Copy link
Contributor

LGTM

@karianna
Copy link
Contributor

Can't be merged...

@wesleycho
Copy link
Contributor

Just needs to be rebased, should be easy.

@chrisirhc chrisirhc force-pushed the feature/datepicker-type-date branch from 192688d to f31d747 Compare April 15, 2015 05:51
@chrisirhc chrisirhc force-pushed the feature/datepicker-type-date branch from f31d747 to 8a05268 Compare April 16, 2015 08:05
@chrisirhc
Copy link
Contributor Author

Rebased. Note that I didn't add support for the weeks input type. Leaving that out for now unless there's a demand for it since we don't currently have a week picker.

@chrisirhc chrisirhc changed the title WIP feat(datepicker): support HTML5 date input type feat(datepicker): support HTML5 input types Apr 16, 2015
@chrisirhc chrisirhc closed this in 1a9e88f Apr 29, 2015
chrisirhc added a commit that referenced this pull request Apr 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selected date is undefined with HTML5 datepicker and Angular 1.3.x
3 participants