Answer the question
In order to leave comments, you need to log in
How to return both dates in input?
I use v-calendar , I'm interested in the question of how to return both dates when choosing a period in one input, in the form 02/01/2021 - 02/02/2021
https://codesandbox.io/s/keen-engelbart-6dyk5?file...
Answer the question
In order to leave comments, you need to log in
const DTF = new Intl.DateTimeFormat('ru-RU');
export default {
name: "App",
data() {
return {
dateRange: { start: new Date(), end: new Date() },
};
},
computed: {
display_value() {
return [this.dateRange.start, this.dateRange.end].map(DTF.format).join(" - ");
}
},
};
:value
this display_value
. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question