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

refactor(MdDatepicker): Better flow #1698

Merged
merged 13 commits into from
Jun 19, 2018
Merged

refactor(MdDatepicker): Better flow #1698

merged 13 commits into from
Jun 19, 2018

Conversation

VdustR
Copy link
Member

@VdustR VdustR commented Apr 28, 2018

  • Upgrading date-fns to 2.0.0-alpha.7
    For using new parser API because we have custom date string format
  • Better naming and structure for inputDate(the string from input), localDate and value(from v-model)
  • New feature: v-model supports number and string now, and its type is reactively modifiable via changing the type of v-model or changing the new props :md-model-type.
    Including documentation
  • Debounce for input (will be conflicted with feat(MdDatepicker): Debounce the conversion into a date object #1666. I'll add that props after it merged)

BREAKING CHANGE: upgrade date-fns to 2.0.0-alpha.7

fix #1689

@marcosmoura
Copy link
Member

@VdustR I think this is not good with the HTML5 standard unless we provide a "format" prop. To pass something like "dd/mm/yyyy". Do you think you can implement something like that?

@VdustR
Copy link
Member Author

VdustR commented May 13, 2018

Do you mean another props format besides vue material configuration locale.dateFormat?

@marcosmoura
Copy link
Member

I mean, we should document the locale.dateFormat.

@VdustR
Copy link
Member Author

VdustR commented May 13, 2018

I added date format option into basic example. Additionally, I think there could be another page(or somewhere else) to explain all vue material options. How do you think?

@marcosmoura
Copy link
Member

@VdustR I agree with you on that New Page thing. Do you think you can do that? It can be on a new page called "Configure" after the getting started.

<template>
<page-container centered :title="$t('pages.configuration.title')">
<div class="page-container-section">
<h2 class="md-headline">How to customized</h2>
Copy link
Member

Choose a reason for hiding this comment

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

Maybe is better to be "Global configuration".

</code-example>
<p>or you can change it via <code>this.$material</code> in a vue component:</p>
<code-example :title="$t('pages.configuration.inVueComponents')">
export default {
Copy link
Member

Choose a reason for hiding this comment

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

This can also be a table with the API. What do you think?

Copy link
Member Author

@VdustR VdustR May 20, 2018

Choose a reason for hiding this comment

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

I don't know. The configuration object is nested. I'm afraid that it can't be described its structure clearly with table.

@Samuell1 Samuell1 merged commit 8a438ae into vuematerial:dev Jun 19, 2018
@VdustR VdustR deleted the fix/MdDatepicker/dateFormat branch June 19, 2018 09:07
@hastom
Copy link
Contributor

hastom commented Mar 22, 2019

@VdustR @Samuell1
This PR breaks datepicker completely.
I think as it was early alpha date-fns formats were just buggy, so behavior of datepicker on current dev branch looks like this:
image
Also date-fns date formats changed after alpha.7

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.

[MdDatepicker] using format 'DD/MM/YYYY' exceeding stack size
4 participants