Datatable text editor + date

Hi team,

I wish to know how fix default date when typing a date please ?

https://snippet.webix.com/1pyvbkih

Example : if i type 21 in the date text editor, the created date is 2000-01-21T23:00:00.000Z

if i type 10/05 , the created date is 2000-01-10T23:00:00.000Z

if i type 10/05/20 , the created date is 2000-01-10T23:00:00.000Z

so the default date is 2000-01-01 : is it possible to fix another default date please ? for example i would use the fist day of the current month.

Regards,
Xavier

Hello,

I’m not sure that I understand you correctly. After typing suggested values the result was the following:
image
So as I can see, this is the expected result.

Anyway, you can read the information on how to format the date.
Also, here is an example: Code Snippet

If there are still any questions, please clarify the result you want to achieve and the use-case.

Hi @NastassiaM ,

thank you for your answer

I wish stay with the text editor
editFormat and parsedFormat give us a date even if i type the day or the day and mont or the, month and part of year

always the return is based on 2000-01-01

so i would change this 2000-01-01 by the curent day for example

i’ll show you on a vidéo

here the video
https://cryptpad.fr/file/#/2/file/Dkl9FRTMz9nv19XXNV7O1eCx/

is it possible to chanage this base date please ?

Hi @NastassiaM

could you watch my video please ?

Hello @XavierDP, sorry for the delay with the response.

I’m afraid there is no easy way to change the default date.
The reason of such behavior is the dateFormatDate method. As a possible workaround you can change the result in a function which parses the date depending on your conditions. E. g. check the value and return current date if the number of characters is less than 10.

As a quick example please check: Code Snippet

Hi @NastassiaM

Tahnk you for your anwser

so i coded the almost behavior

https://snippet.webix.com/dtwd25ww

1 Like