Vue-material: [MdDatepicker] using format 'DD/MM/YYYY' exceeding stack size

Created on 19 Apr 2018  路  8Comments  路  Source: vuematerial/vue-material

Steps to reproduce

Setting Vue.material.locale.dateFormat = 'DD/MM/YYYY'.
Trying to select a date using md-datepicker.

Which browser?

Chrome Canary.

What is expected?

Be able to select a date.

What is actually happening?

When selecting a date using the dateFormat is DD/MM/YYYY the watcher for selecteDate is again executed and then there is loop.

https://github.com/vuematerial/vue-material/blob/dev/src/components/MdDatepicker/MdDatepicker.vue#L88

Reproduction Link

https://codesandbox.io/s/6398yyjqn

bug

All 8 comments

the same with DD.MM.YYYY

With 'DD.MM.YYYY' Chrome hangs after 3 or 4 selects in a row.
Firefox is not...

Yeah, same here. Firefox seems to work fine but after selecting a couple of dates in a row with format DD.MM.YYYY, it hangs up.

I just tried to use the master branch instead of the release. Does not work either.

Try dev branch

Bad luck...
Using dev branch, now I don't need to select dates 3-4 times. Chrome hangs up immediately...
Firefox is still ok...

Dont forget to rebuild dev branch, we dont provide rebuilded dist files with fixes in dev branch

@Samuell1 I have two date-picker in the same form, one of them is giving date value as object Tue Jan 05 2021 00:00:00 GMT+0530 (India Standard Time) and other is logging out 2021-01-05 The data from first datepicker is giving error while inserting in my db. I even added computed

dateFormat: {
            get() {
                return this.$material.locale.dateFormat;
            },
            set() {
                this.$material.locale.dateFormat = 'yyyy-MM-dd';
            }
        }

but format is still giving format error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreujuanc picture andreujuanc  路  3Comments

sergey-koretsky picture sergey-koretsky  路  3Comments

korylprince picture korylprince  路  3Comments

delueg picture delueg  路  3Comments

sandhose picture sandhose  路  3Comments