How to use a string value i9nstead of a date for end date on calendar widget.

0
Hi, in a solution of ours we have a calendar widget for specifying employee leave; for unplanned leave we want the end date to display as 'ongoing' rather than a date/time. Attached you can see the settings and it seems to force you to use a DateTime field, surely there must be a way to input 'Ongoing' as a string in my example?   
asked
2 answers
0

You would have to edit the widget xml file to change return types.

https://docs.mendix.com/refguide6/xml-reference-guide

I think you will have to do some more customizing of the widget to make your solution work.

answered
0

Hi Craig,

If I'm understanding your problem correctly, I think that conditional visibility might be a better solution here, than trying to modify a custom widget. 

Assuming you have a Leave entity of some sort with attributes for StartDate, EndDate, Type where Type can be "planned" or "unplanned", perhaps you could use conditional visibility to only show the EndDate datepicker when the Type is "planned," and when Type is "unplanned," leave the EndDate attribute empty and instead show "Ongoing" in plain text.

Would this help address your issue?

answered