<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DatePicker &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/datepicker/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Wed, 15 Sep 2021 16:16:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Web DatePicker Quick Tip: Check Your Settings</title>
		<link>https://blog.xojo.com/2021/09/15/web-datepicker-quick-tip-check-your-settings/</link>
		
		<dc:creator><![CDATA[Wayne Golding]]></dc:creator>
		<pubDate>Wed, 15 Sep 2021 16:16:12 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[DatePicker]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=9214</guid>

					<description><![CDATA[A quick tip I wanted to share about using Web DatePicker. I was using the DatePicker control on a web page and the results didn't look correct. ]]></description>
										<content:encoded><![CDATA[
<p>Read on for a quick tip about using Xojo&#8217;s <a href="https://documentation.xojo.com/api/user_interface/web/webdatepicker.html">Web DatePicker</a>. I was using the DatePicker control on a web page and the results didn&#8217;t look correct. </p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img fetchpriority="high" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-300x143.png" alt="" class="wp-image-9230" width="563" height="268" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-300x143.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-1024x489.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-768x367.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM.png 1046w" sizes="(max-width: 563px) 100vw, 563px" /></figure>



<p>You can see that the DatePicker is rendering the date in M/D/Y format, but here in New Zealand (and a lot of other places) we use D/M/Y as seen in the Locale.Current text field.</p>



<p>I then looked at WorldTimeServer.com and I can see that this site that is dedicated to dates and times is also rendering dates in M/D/Y format.</p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM-300x246.png" alt="" class="wp-image-9232" width="472" height="387" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM-300x246.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM-768x629.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM.png 918w" sizes="(max-width: 472px) 100vw, 472px" /></figure>



<p>This led me to believe that my browser wasn’t giving the correct language code to these sites. I did a little digging and found that my browser has a Languages setting and mine was defaulting to English (United States).  And the United States, unlike New Zealand, uses M/D/Y.</p>



<figure class="wp-block-image size-large is-style-default"><img decoding="async" width="1024" height="314" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-1024x314.png" alt="" class="wp-image-9233" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-1024x314.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-300x92.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-768x236.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM.png 1154w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>To fix this I added my language to the browser and set it to be the first in the list.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="372" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-1024x372.png" alt="" class="wp-image-9234" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-1024x372.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-300x109.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-768x279.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM.png 1156w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now WorldTimeServer.com renders dates in D/M/Y format.</p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM-300x268.png" alt="" class="wp-image-9235" width="482" height="431" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM-300x268.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM-768x687.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM.png 1006w" sizes="auto, (max-width: 482px) 100vw, 482px" /></figure>



<p>And the DatePicker in my Xojo project now renders correctly as well.</p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM-300x115.png" alt="" class="wp-image-9236" width="569" height="218" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM-300x115.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM-768x294.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM.png 986w" sizes="auto, (max-width: 569px) 100vw, 569px" /></figure>



<p>And I didn’t change a single line of code in my Xojo project to fix it!</p>



<p><em>Wayne Golding has been a Xojo developer since 2005 and is a Xojo MVP. He operates the IT Company <a href="http://www.axisdirect.nz">Axis Direct Ltd </a>which primarily develops applications using Xojo that integrate with Xero www.xero.com. Wayne’s hobby is robotics where he uses Xojo to build applications for his Raspberry Pi, often implementing IoT for remote control.</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
