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

Added Modular and bindable date parser + bug on parsing date on tab keypress #221

Merged
merged 2 commits into from
Jul 25, 2016

Conversation

Kukks
Copy link
Contributor

@Kukks Kukks commented Jul 25, 2016

#197

from the updated samples doc:
If you would like to configure different parsers to handle the editable option, simply bind the parsers property and push/remove/replace the array with your own Parser classes. The Parser class would need to consists of canParse(value) and parse(value). The example here allows you to type in "yesterday" and will parse for you yesterday's date.

acamilleri added 2 commits July 25, 2016 13:53
fix(md-datepicker): Datepicker opening when setting date through textbox
feat(md-datepicker): Add modular and bindable way of adding parsers to datepicker
…ia-materialize-bridge

# Conflicts:
#	dist/aurelia-materialize-bridge.js
#	dist/dev/dist/dev/pagination/pagination.js.map
#	dist/dev/dist/dev/sidenav/sidenav.js.map
#	dist/temp/aurelia-materialize-bridge.js
@coveralls
Copy link

coveralls commented Jul 25, 2016

Coverage Status

Coverage remained the same at 95.154% when pulling b4d9dd1 on Kukks:master into 2eafc5f on aurelia-ui-toolkits:master.

@@ -1,3 +1,7 @@
import {DatePickerDefaultParser} from '../../../../src/aurelia-materialize-bridge/datepicker/datepicker.default-parser';
Copy link
Collaborator

@Thanood Thanood Jul 25, 2016

Choose a reason for hiding this comment

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

Why not import {DatePickerDefaultParser} from 'aurelia-materialize-bridge/datepicker/datepicker.default-parser';? Did that not work?

Btw. if you export the default parser in index.js you should be able to reference it using import {DatePickerDefaultParser} from 'aurelia-materialize-bridge/datepicker.default-parser';. When I recall correctly. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, did not come to mind. I didn't check if there was a aurelia-materialize-bridge alias in the config.js for the samples so I played it safe and did it directly ;)
I can change tomorrow though :)

@Thanood
Copy link
Collaborator

Thanood commented Jul 25, 2016

Very nice, thanks!
Would you mind not pushing the dist folder? I know you work from a fork and import that directly into your project but maybe it's possible.

(that's not the reason I'm not merging that right now 😉 )

@Kukks
Copy link
Contributor Author

Kukks commented Jul 25, 2016

Hmm sure, But it will have to be from the next time since I pushed it all in one commit this time. I'll start doing feature branches then :)

@Thanood Thanood merged commit db770dc into aurelia-ui-toolkits:master Jul 25, 2016
@Thanood
Copy link
Collaborator

Thanood commented Jul 25, 2016

When I set a max date, I can still enter something out of range and the reult is stored in the view model. The date picker correctly restricts the date..

@Thanood
Copy link
Collaborator

Thanood commented Jul 25, 2016

Okay, fixed that. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants