How to Clear a DateTime field, in the Field Editor??

  • 2
  • Question
  • Updated 4 years ago
  • Answered
So I have a Date/Time field for a 'Due Date'.
Currently it defaults to null/no datetime.

Once you select a date/time, how can the user remove the date/time?
Surely there must be a way to 'zero' it out, but I can't figure out how to do it.

Thanks
Photo of Seth Vanderdrift

Seth Vanderdrift

  • 878 Points 500 badge 2x thumb

Posted 4 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Take a look at this post about reference fields.  Repurposing it for date fields should be totally doable. 

https://community.skuidify.com/skuid/topics/this-possible-without-javascript-row-action-to-remove-va...
Photo of Seth Vanderdrift

Seth Vanderdrift

  • 878 Points 500 badge 2x thumb
Is this the snippet you're talking about?

$ = skuid.$;var model = skuid.model.getModel('YourModelName');
var row = model.getFirstRow();
model.updateRow(row, {ReferenceFieldName:''});
How's the user supposed to call that?  At present... ;), I can't add a "Clear" button next to the date field.  I'm sure they're going to try the obvious thing and just edit the field, then backspace out the date.  But you leave the field and the value comes back.

Surely I can't be the only one which needs to clear out a date field?