<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Date selection components	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/date-selection-components/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/date-selection-components?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=date-selection-components</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Fri, 21 Apr 2023 18:07:53 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Andrés Aguilar		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-521470</link>

		<dc:creator><![CDATA[Andrés Aguilar]]></dc:creator>
		<pubDate>Fri, 21 Apr 2023 18:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-521470</guid>

					<description><![CDATA[Hello, has anyone tried to change the language of the DateComboBox? For example 

English -&#062; French
-------------------
January -&#062; Janvier
April   -&#062; Avril

English -&#062; Italian
-------------------
Today   -&#062; Oggi
None    -&#062; Nessuna

Thanks in advance!]]></description>
			<content:encoded><![CDATA[<p>Hello, has anyone tried to change the language of the DateComboBox? For example </p>
<p>English -&gt; French<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
January -&gt; Janvier<br />
April   -&gt; Avril</p>
<p>English -&gt; Italian<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Today   -&gt; Oggi<br />
None    -&gt; Nessuna</p>
<p>Thanks in advance!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-513559</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 16 Feb 2022 20:44:22 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-513559</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/date-selection-components#comment-513558&quot;&gt;Tim&lt;/a&gt;.

@Tim - the new uidatepicker() function only works with web-based figures (created using the uifigure() function or App Designer); it is not available on the legacy Java-based figures, and practically everything in this article relates to Java-based figures, and the controls are Java-based (not HTML/Javascript based like &lt;code&gt;matlab.ui.control.DatePicker&lt;/code&gt; on which uidatepicker() is based).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/date-selection-components#comment-513558">Tim</a>.</p>
<p>@Tim &#8211; the new uidatepicker() function only works with web-based figures (created using the uifigure() function or App Designer); it is not available on the legacy Java-based figures, and practically everything in this article relates to Java-based figures, and the controls are Java-based (not HTML/Javascript based like <code>matlab.ui.control.DatePicker</code> on which uidatepicker() is based).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tim		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-513558</link>

		<dc:creator><![CDATA[Tim]]></dc:creator>
		<pubDate>Wed, 16 Feb 2022 20:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-513558</guid>

					<description><![CDATA[There&#039;s now a uidatepicker object, but still not one for times / timezones.  Is there any update to suggested methods for acquiring a user entered time?

https://www.mathworks.com/help/matlab/ref/uidatepicker.html]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s now a uidatepicker object, but still not one for times / timezones.  Is there any update to suggested methods for acquiring a user entered time?</p>
<p><a href="https://www.mathworks.com/help/matlab/ref/uidatepicker.html" rel="nofollow ugc">https://www.mathworks.com/help/matlab/ref/uidatepicker.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Vasiliy		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-509951</link>

		<dc:creator><![CDATA[Vasiliy]]></dc:creator>
		<pubDate>Fri, 12 Feb 2021 11:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-509951</guid>

					<description><![CDATA[Hi Yair,

i&#039;m trying to use the MonthChooserPanel class.

&lt;pre lang=&quot;matlab&quot;&gt;
com.mathworks.mwswing.MJUtilities.initJIDE;
handles.jPanel = com.jidesoft.combobox.MonthChooserPanel;
[handles.hPanel, handles.hContainer] = javacomponent(handles.jPanel,[100,100,300,200],gcf);
juiFunHandle = handle(handles.jPanel, &#039;CallbackProperties&#039;);
set(juiFunHandle, &#039;MousePressedCallback&#039;, @(src, evnt)CellSelectionCallback(src, evnt, handles));

function CellSelectionCallback(~, ~, handles)
    textBox = handles.testEdit;
    numRetry = 10;
    for k = 1:numRetry
        pause(0.1)
        dateString = char( javaMethodEDT(&#039;getSelectedDate&#039;, handles.jPanel));
        if ~isempty(dateString) 
            break; 
        end
    end
    set(textBox , &#039;String&#039; , dateString);
end
&lt;/pre&gt;
With DateChooserPanel everything works perfectly, but i need to select only the month and year and then output them in an edit field. The CellSelectionCallback function is not normally activated when i click on a month in MonthChooserPanel, only when the month is selected and then i click on the white area next to it, it reacts, but that is not acceptable. Therefore i would to know whether it would be possible to work correctly with this Java class in Matlab.]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>i&#8217;m trying to use the MonthChooserPanel class.</p>
<pre lang="matlab">
com.mathworks.mwswing.MJUtilities.initJIDE;
handles.jPanel = com.jidesoft.combobox.MonthChooserPanel;
[handles.hPanel, handles.hContainer] = javacomponent(handles.jPanel,[100,100,300,200],gcf);
juiFunHandle = handle(handles.jPanel, 'CallbackProperties');
set(juiFunHandle, 'MousePressedCallback', @(src, evnt)CellSelectionCallback(src, evnt, handles));

function CellSelectionCallback(~, ~, handles)
    textBox = handles.testEdit;
    numRetry = 10;
    for k = 1:numRetry
        pause(0.1)
        dateString = char( javaMethodEDT('getSelectedDate', handles.jPanel));
        if ~isempty(dateString) 
            break; 
        end
    end
    set(textBox , 'String' , dateString);
end
</pre>
<p>With DateChooserPanel everything works perfectly, but i need to select only the month and year and then output them in an edit field. The CellSelectionCallback function is not normally activated when i click on a month in MonthChooserPanel, only when the month is selected and then i click on the white area next to it, it reacts, but that is not acceptable. Therefore i would to know whether it would be possible to work correctly with this Java class in Matlab.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: DM		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-509949</link>

		<dc:creator><![CDATA[DM]]></dc:creator>
		<pubDate>Fri, 12 Feb 2021 11:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-509949</guid>

					<description><![CDATA[Hi Yair,

I&#039;m trying to use the &lt;code&gt;MonthChooserPanel&lt;/code&gt; class.

&lt;pre lang=&quot;matlab&quot;&gt;
com.mathworks.mwswing.MJUtilities.initJIDE;
handles.jPanel = com.jidesoft.combobox.MonthChooserPanel;
[handles.hPanel, handles.hContainer] = javacomponent(handles.jPanel,[100,100,300,200],gcf);
juiFunHandle = handle(handles.jPanel, &#039;CallbackProperties&#039;);
set(juiFunHandle, &#039;MousePressedCallback&#039;, @(src, evnt)CellSelectionCallback(src, evnt, handles));

function CellSelectionCallback(~, ~, handles)
    textBox = handles.testEdit;
    numRetry = 10;
    for k = 1:numRetry
        pause(0.1)
        dateString = char( javaMethodEDT(&#039;getSelectedDate&#039;, handles.jPanel));
        if ~isempty(dateString) 
            break; 
        end
    end
    set(textBox , &#039;String&#039; , dateString);
end
&lt;/pre&gt;

With &lt;code&gt;DateChooserPanel&lt;/code&gt; everything works perfectly, but I need to select only the month and year and then output them in an edit field. The &lt;b&gt;CellSelectionCallback&lt;/b&gt; function is not normally activated when I click on a month in &lt;code&gt;MonthChooserPanel&lt;/code&gt;, only when the month is selected and then i click on the white area next to it, it reacts, but that is not acceptable. Therefore I would to know whether it would be possible to work correctly with this Java class in Matlab.]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>I&#8217;m trying to use the <code>MonthChooserPanel</code> class.</p>
<pre lang="matlab">
com.mathworks.mwswing.MJUtilities.initJIDE;
handles.jPanel = com.jidesoft.combobox.MonthChooserPanel;
[handles.hPanel, handles.hContainer] = javacomponent(handles.jPanel,[100,100,300,200],gcf);
juiFunHandle = handle(handles.jPanel, 'CallbackProperties');
set(juiFunHandle, 'MousePressedCallback', @(src, evnt)CellSelectionCallback(src, evnt, handles));

function CellSelectionCallback(~, ~, handles)
    textBox = handles.testEdit;
    numRetry = 10;
    for k = 1:numRetry
        pause(0.1)
        dateString = char( javaMethodEDT('getSelectedDate', handles.jPanel));
        if ~isempty(dateString) 
            break; 
        end
    end
    set(textBox , 'String' , dateString);
end
</pre>
<p>With <code>DateChooserPanel</code> everything works perfectly, but I need to select only the month and year and then output them in an edit field. The <b>CellSelectionCallback</b> function is not normally activated when I click on a month in <code>MonthChooserPanel</code>, only when the month is selected and then i click on the white area next to it, it reacts, but that is not acceptable. Therefore I would to know whether it would be possible to work correctly with this Java class in Matlab.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Philip		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-508824</link>

		<dc:creator><![CDATA[Philip]]></dc:creator>
		<pubDate>Fri, 14 Aug 2020 08:16:14 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-508824</guid>

					<description><![CDATA[Yair,

How would I implement a renderer for com.jidesoft.combobox.DateSpinnerComboBox so that the editor remains the same (combo box with spinner) but the renderer displays as a simple center aligned text field (like javax.swing.JTextField)?

Thanks in advance,

Philip]]></description>
			<content:encoded><![CDATA[<p>Yair,</p>
<p>How would I implement a renderer for com.jidesoft.combobox.DateSpinnerComboBox so that the editor remains the same (combo box with spinner) but the renderer displays as a simple center aligned text field (like javax.swing.JTextField)?</p>
<p>Thanks in advance,</p>
<p>Philip</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ana Gomez		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-508699</link>

		<dc:creator><![CDATA[Ana Gomez]]></dc:creator>
		<pubDate>Thu, 04 Jun 2020 06:24:15 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-508699</guid>

					<description><![CDATA[Hi Yair,

Thank you for this interesting post, I am finding it really useful. However I am facing an issue that I am not able to solve.

I am using DateComboBox to select a date. I was able to change the language of the calendar shown using the function setLocale after identifying all possible values with: Locale.getAvailableLocales. But after selecting the date, I am not able to modify the language (or the format) in which the date string is displayed in the pop-up menu. For example it would be enough if the month was shown as number instead of with the three initial letters.

Could you please give me some advice? Thank you very much in advance!]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>Thank you for this interesting post, I am finding it really useful. However I am facing an issue that I am not able to solve.</p>
<p>I am using DateComboBox to select a date. I was able to change the language of the calendar shown using the function setLocale after identifying all possible values with: Locale.getAvailableLocales. But after selecting the date, I am not able to modify the language (or the format) in which the date string is displayed in the pop-up menu. For example it would be enough if the month was shown as number instead of with the three initial letters.</p>
<p>Could you please give me some advice? Thank you very much in advance!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-508561</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 26 Apr 2020 14:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-508561</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/date-selection-components#comment-508471&quot;&gt;claudio&lt;/a&gt;.

@Claudio - I don&#039;t know exactly what you did in your code, the following works perfectly fine for me on R2020a:
&lt;pre lang=&quot;matlab&quot;&gt;
jComponent = com.jidesoft.combobox.DateComboBox;
jComponent.getEditor.getEditorComponent.setText(&#039;Set Default data&#039;);
[hComponent,hContainer] = javacomponent(jComponent, [10,100,100,20], gcf);
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/date-selection-components#comment-508471">claudio</a>.</p>
<p>@Claudio &#8211; I don&#8217;t know exactly what you did in your code, the following works perfectly fine for me on R2020a:</p>
<pre lang="matlab">
jComponent = com.jidesoft.combobox.DateComboBox;
jComponent.getEditor.getEditorComponent.setText('Set Default data');
[hComponent,hContainer] = javacomponent(jComponent, [10,100,100,20], gcf);
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: claudio		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-508471</link>

		<dc:creator><![CDATA[claudio]]></dc:creator>
		<pubDate>Wed, 15 Apr 2020 21:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-508471</guid>

					<description><![CDATA[Hi Yair

i&#039;m trying to set default string in DateComboBox to display before selecting date from date panel

&lt;pre lang=&quot;matlab&quot;&gt;
jElement.getEditor.getEditorComponent.setText(&#039;Set default date&#039;)
jElement.getEditor.getEditorComponent.setText(java.lang.String(&#039;Set default date&#039;))
&lt;/pre&gt;

but neither statement produces an effect. what am I wrong?
Thanks in advance for the help!]]></description>
			<content:encoded><![CDATA[<p>Hi Yair</p>
<p>i&#8217;m trying to set default string in DateComboBox to display before selecting date from date panel</p>
<pre lang="matlab">
jElement.getEditor.getEditorComponent.setText('Set default date')
jElement.getEditor.getEditorComponent.setText(java.lang.String('Set default date'))
</pre>
<p>but neither statement produces an effect. what am I wrong?<br />
Thanks in advance for the help!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alex		</title>
		<link>https://undocumentedmatlab.com/articles/date-selection-components#comment-430480</link>

		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 21 Jun 2018 16:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1684#comment-430480</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/date-selection-components#comment-430357&quot;&gt;Alex&lt;/a&gt;.

Thanks so much for your help Yair, code worked perfectly, you&#039;re a life saver.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/date-selection-components#comment-430357">Alex</a>.</p>
<p>Thanks so much for your help Yair, code worked perfectly, you&#8217;re a life saver.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
