<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Append calendar box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Append-calendar-box/m-p/527364#M75123</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a UI to select dates. I have added a button box which will append calendar box to the panel box but every time I click, it will keep adding elements to the panel box. I want to hide the calendar box on second click. Is there a way to achieve this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_0-1658970097030.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44392iD3777B35E963C2AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_0-1658970097030.png" alt="Jacksmith12_0-1658970097030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;sd=Today();
ed=Today();
New Window( "Query Date", &amp;lt;&amp;lt;Modal,
 HListBox(
   Panel1= PanelBox( "From Time"),
   	Button Box("click",
   	Panel1 &amp;lt;&amp;lt; removeALl;
   	Panel1 &amp;lt;&amp;lt; Append(scal1 = Calendar Box(, SetFunction(Function({this}, sd1=scal1&amp;lt;&amp;lt; Get Date) )));
   )
      
    )

);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:05:40 GMT</pubDate>
    <dc:creator>Jackie_</dc:creator>
    <dc:date>2023-06-09T17:05:40Z</dc:date>
    <item>
      <title>Append calendar box</title>
      <link>https://community.jmp.com/t5/Discussions/Append-calendar-box/m-p/527364#M75123</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a UI to select dates. I have added a button box which will append calendar box to the panel box but every time I click, it will keep adding elements to the panel box. I want to hide the calendar box on second click. Is there a way to achieve this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_0-1658970097030.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44392iD3777B35E963C2AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_0-1658970097030.png" alt="Jacksmith12_0-1658970097030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;sd=Today();
ed=Today();
New Window( "Query Date", &amp;lt;&amp;lt;Modal,
 HListBox(
   Panel1= PanelBox( "From Time"),
   	Button Box("click",
   	Panel1 &amp;lt;&amp;lt; removeALl;
   	Panel1 &amp;lt;&amp;lt; Append(scal1 = Calendar Box(, SetFunction(Function({this}, sd1=scal1&amp;lt;&amp;lt; Get Date) )));
   )
      
    )

);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:05:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-calendar-box/m-p/527364#M75123</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-09T17:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Append calendar box</title>
      <link>https://community.jmp.com/t5/Discussions/Append-calendar-box/m-p/527404#M75127</link>
      <description>&lt;P&gt;Here is one way to handle it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
sd = Today();
ed = Today();
flag = 0;
New Window( "Query Date",
	&amp;lt;&amp;lt;Modal,
	H List Box(
		Panel1 = Panel Box( "From Time" ),
		Button Box( "click",
			If( flag == 0,
				Panel1 &amp;lt;&amp;lt; removeALl;
				Panel1 &amp;lt;&amp;lt; Append( scal1 = Calendar Box( , SetFunction( Function( {this}, sd1 = scal1 &amp;lt;&amp;lt; Get Date ) ) ) );
				flag = 1;
			,
				scal1 &amp;lt;&amp;lt; visibility( "collapse" )
			)
      
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2022 04:56:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-calendar-box/m-p/527404#M75127</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-28T04:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Append calendar box</title>
      <link>https://community.jmp.com/t5/Discussions/Append-calendar-box/m-p/527646#M75142</link>
      <description>&lt;P&gt;Just to expand on&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;'s suggestion, here is another. It only illustrates a technique. It is not a complete script by any means. It also shows that using a date format with the Number Edit Box will automatically provide a calendar option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

sd = ed = Today();
visible = 0;

New Window( "Query Date",
	&amp;lt;&amp;lt; Modal,
	Panel Box( "From Time",
		Line Up Box( N Col( 3 ),
			Text Box( "Start" ),
			Number Edit Box( sd,
				&amp;lt;&amp;lt; Set Format( Format( "m/d/y", 12 ) )
			),
			cb1 = Calendar Box( &amp;lt;&amp;lt; Visibility( Collapse ) ),
			Text Box( "End" ),
			Number Edit Box( ed,
				&amp;lt;&amp;lt; Set Format( Format( "m/d/y", 12 ) )
			),
			cb2 = Calendar Box( &amp;lt;&amp;lt; Visibility( Collapse ) )
		)
	),
	bb = Button Box( "Show Calendars",
		If( visible,
			{ cb1, cb2 } &amp;lt;&amp;lt; Visibility( Collapse );
			bb &amp;lt;&amp;lt; Set Button Name( "Show Calendars" ),
			{ cb1, cb2 } &amp;lt;&amp;lt; Visibility( Visible );
			bb &amp;lt;&amp;lt; Set Button Name( "Hide Calendars" );
		);
		visible = !visible;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2022 13:00:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Append-calendar-box/m-p/527646#M75142</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-07-28T13:00:44Z</dc:date>
    </item>
  </channel>
</rss>

