DatePicker in custom widget

1
Hi all, i am creating custom widget. I want to use Mendix DatePicker in my HTML template. Is that possible? Regards, Lukas
asked
3 answers
1

Hi Lukas,

Best is to create the widget in your postCreate using javascript. As domNode you can assign a node from your template (you can refer to nodes in a template when you give them a dojoAttachpointAttribute).

answered
1

If you want to create a similar widget but with some extra functionality you might also consider to extend the datepicker widget with dojo.extend or dojo.mixin.

answered
0

My comment is too long so i will formulate my note in answer...

My need is select date and for example hit button, which render special HTML table with special functionality. That is my widget, the table. But i dont know how to do it. Two ways comes in my mind.

1) Have some mendix form and microflow button which opens my second form containg my widget. Problem is i dont know how to pass the date parameter to my widget. How can i access him in widget JS file? (Or select this parameter in properties of my widget, which is specified in widget.xml file?)

2) Input field for date will be present inside my widget. Problem is i dont know how to use dojo datepicker in my HTML template of widget.

Note for Michel: yes, i know the ability, i can access HTML nodes using dojoAttachPoint attribute...

answered