eledwinn / vue-editable-grid

Simple Vue grid with edit mode and cell navigation such as excel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typing a date with numbers gives longer years

szabozoltan69 opened this issue · comments

Dear Edwin,

if we type a date (in a date field, format: "yyyy-MM-dd"), and we use only numbers, then the year gets 5 or 6 digits long.
image

Is it possible to limit it to 4?

Hi @szabozoltan69 , we are using. <input type='date' /> element, we are limited to what this control can do. Do you know if we can do that in this element?

The date input tag has same attribututes like the number input: min, max, step
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date#Additional_attributes

A column def already can handle format:
{ ..., format: 'MMM dd, yyyy', ... },
If max property is undefined, the default value can be 9999-12-31. Same logic with min property.

In my opinion this is a simple solution.

Great, that's fine with me. I will be working on this this week.
Or if you prefer, feel free to send your PullRequest 😄

Thanks for the enhancement! Great work!

Published as version 0.3.17 🚀