Closed dermansi closed 6 years ago
Yes, I just use new Date(this.value).toLocaleDateString()
.
Because I only need to format the date, but the prop format
format date time.
Thank you for your fast answer. Can you introduce a new property which formats just the date for those two cases?
If you really want to change it, you can modify the source code.
import DatePicker from 'vue2-datepicker'
DatePicker.components.CalendarPanel.computed.timeHeader = function () {
return DatePicker.methods.stringify(this.value, 'YYYY-MM-DD')
}
In v2.3.1.
I added a prop named date-format
to format header time and date's tooltip.
If not set, the default is based on format
prop.
Hey,
great work!
One thing that came to my mind while using it: the displayed date in the tooltip when hovering over a cell and the one displayed over the time picker (which let's you go back to date selection) aren't respecting the picked date format. They will always displayed as xx/xx/xxxx.
Every displayed date should respect the selected format.
Regards dermansi