Hi,
I tried to use DateTimeField editor in Gantt Column outside of currently supported column types ( such as StartDateColumn, BaselineStartDateColumn, ...).
{
type : 'date',
text : 'Custom Date',
field : 'customDate',
editor : 'datetimefield',
format : 'MM/DD/YYYY HH:mm:ss A',
},
It was able to display the format correctly with string input "03/14/2024 12:00:00 PM". But the moment I double click to edit the cell, I got error:
first.getTime is not a function
TypeError: first.getTime is not a function
at _DateHelper.isEqual (http://localhost:3000/static/js/bundle.js:63631:39)
at DateTimeField.hasChanged (http://localhost:3000/static/js/bundle.js:127282:24)
at DateTimeField.changeValue (http://localhost:3000/static/js/bundle.js:118874:14)
at DateTimeField.set (http://localhost:3000/static/js/bundle.js:57107:44)
at DateTimeField.setValue (http://localhost:3000/static/js/bundle.js:118868:16)
at Editor.startEdit (http://localhost:3000/static/js/bundle.js:127915:26)
at CellEdit3.startEditing (http://localhost:3000/static/js/bundle.js:141421:26)
at async CellEdit3.startEditing (http://localhost:3000/static/js/bundle.js:236181:16)
at async CellEdit3.onTriggerEditEvent (http://localhost:3000/static/js/bundle.js:141603:5)
at async Promise.all (index 0)
But it worked without any errors in the console. I attached a video of how I tried to reproduce, could you confirm that I'm trying to reproduce correctly?
If you couldn't reproduce it on our demo, can you share a small test case with your configuration and the behavior you're describing? You can get more info by checking out the guidelines here https://www.bryntum.com/forum/viewtopic.php?f=1&t=772
I tried project from "examples\frameworks\react\javascript\advanced" and I couldn't see the issue. But when I tried from "examples\frameworks\react\javascript\inline-data", I saw a similar error to mine [see video in attachment]
My project setup is similar to inline-data, and I wonder if it's the issue?
Thank you for your response. I'm glad it's a quick bug to fix and will be in the next patch.
Just to make sure I understand this correctly, I need both the fix and the additional code to make this to work, right?
I tried the addition code in "inline-data" project, editing didn't give me error anymore but it didn't show the customDate I put in inlineData.js either.
It is a fix for unhandled exceptions.
But you still need to configure application as I mentioned above.
This won't work without a fix in application code even in 5.6.9.
Custom date in data should be in format like '2024-02-01T10:00:00'
If it has another format then you should configure field accordingly.