Including datetext in a table pane
Hi Guys,
is there a way to include a datetext in a tablepane cell maybe using OnDrawCell?
I've tried :
&html<<input type ="date" id="serialno" style=" width: 80%;" />>
but doesn't work with IE 11 and under, so it would be good if I can include datetext component instead.
Thanks
Product version: Ensemble 2014.1
Discussion (4)1
Comments
I have not understood what you want, could you give me more details?
If you have OnCreateResultSet, you may try to use a SQL Function to return what you want if I understood correctly.
I need to include a date picker in a tablepane cell, as you know you can include a textbox a link...etc in a tablepane cell but how can you include a date picker?
Thanks
Now I got it. I don't know how to help you.
You may try https://jqueryui.com/datepicker/
E.g.:
Class dc.test Extends %ZEN.Component.page
{
XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ]
{
<page xmlns="http://www.intersystems.com/zen">
<tablePane id="tp" sql="select 1 id, '2021-11-03' DT union select 2, '2022-01-24'">
<column colName="id"/>
<column colName="DT" link="javascript:zenPage.modalGroupCalendar('#(%query.DT)#');"/>
</tablePane>
</page>
}
ClientMethod modalGroupCalendar(val) [ Language = javascript ]
{
var group = zenPage.createComponent('modalGroup');
group.setProperty('onaction','zenPage.calendarAction(group);');
group.show('Select a date:','calendar',val);
}
ClientMethod calendarAction(group) [ Language = javascript ]
{
alert("You selected: " + group.getValue());
// SaveOnServer(); !
}
}