Question
Rochdi Badis · Oct 27

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
01
1 0 4 65
Log in or sign up to continue

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

Try Built-in Modal Groups

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(); !
}

}