Written by

Question Nezla · Oct 27, 2021

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

Comments

Guilherme Mendes · Oct 27, 2021

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.

0
Nezla  Oct 27, 2021 to Guilherme Mendes

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

0
Vitaliy Serdtsev · Nov 3, 2021

Try Built-in Modal Groups

E.g.:

<FONT COLOR="#000080">Class dc.test Extends %ZEN.Component.page
</FONT><FONT COLOR="#000000">{

</FONT><FONT COLOR="#000080">XData </FONT><FONT COLOR="#000000">Contents [ </FONT><FONT COLOR="#000080">XMLNamespace </FONT><FONT COLOR="#000000">= </FONT><FONT COLOR="#800080">"http://www.intersystems.com/zen" </FONT><FONT COLOR="#000000">] { <</FONT><FONT COLOR="#000080">page </FONT><FONT COLOR="#800000">xmlns</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"http://www.intersystems.com/zen"</FONT><FONT COLOR="#000000">>   <</FONT><FONT COLOR="#000080">tablePane </FONT><FONT COLOR="#800000">id</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"tp" </FONT><FONT COLOR="#800000">sql</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"select 1 id, '2021-11-03' DT union select 2, '2022-01-24'"</FONT><FONT COLOR="#000000">>     <</FONT><FONT COLOR="#000080">column </FONT><FONT COLOR="#800000">colName</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"id"</FONT><FONT COLOR="#000000">/>     <</FONT><FONT COLOR="#000080">column </FONT><FONT COLOR="#800000">colName</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"DT" </FONT><FONT COLOR="#800000">link</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"javascript:zenPage.modalGroupCalendar('#(%query.DT)#');"</FONT><FONT COLOR="#000000">/>   </</FONT><FONT COLOR="#000080">tablePane</FONT><FONT COLOR="#000000">> </</FONT><FONT COLOR="#000080">page</FONT><FONT COLOR="#000000">> }

</FONT><FONT COLOR="#000080">ClientMethod </FONT><FONT COLOR="#000000">modalGroupCalendar(</FONT><FONT COLOR="#ff00ff">val</FONT><FONT COLOR="#000000">) [ </FONT><FONT COLOR="#000080">Language </FONT><FONT COLOR="#000000">= javascript ] {   </FONT><FONT COLOR="#008080">var </FONT><FONT COLOR="#000000">group </FONT><FONT COLOR="#000080">= </FONT><FONT COLOR="#000000">zenPage.createComponent(</FONT><FONT COLOR="#800000">'modalGroup'</FONT><FONT COLOR="#000000">);   group.setProperty(</FONT><FONT COLOR="#800000">'onaction'</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">'zenPage.calendarAction(group);'</FONT><FONT COLOR="#000000">);   group.show(</FONT><FONT COLOR="#800000">'Select a date:'</FONT><FONT COLOR="#000000">,</FONT><FONT COLOR="#800000">'calendar'</FONT><FONT COLOR="#000000">,val); }

</FONT><FONT COLOR="#000080">ClientMethod </FONT><FONT COLOR="#000000">calendarAction(</FONT><FONT COLOR="#ff00ff">group</FONT><FONT COLOR="#000000">) [ </FONT><FONT COLOR="#000080">Language </FONT><FONT COLOR="#000000">= javascript ] {   alert(</FONT><FONT COLOR="#800000">"You selected: " </FONT><FONT COLOR="#000080">+ </FONT><FONT COLOR="#000000">group.getValue());   </FONT><FONT COLOR="#008000">// SaveOnServer(); ! </FONT><FONT COLOR="#000000">}

}</FONT>

0