<?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 Formatting a dateTime in Web Form similar to InputMask in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/formatting-a-datetime-in-web-form-similar-to/m-p/863539#M26411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a public-facing survey working well using the desktop/mobile app and am modifying it to work on the Web. During the testing phase, one of testers has noted that the manual input of a date into a dateTime question allows the user to input a dates that are physically impossible (e.g. 123/4567/8901); we know a hunter somehow would input a date like this. I have tried some methods for restricting the input to MM/DD/YYYY to match the desktop/mobile app with little success. I have seen where I can use a regular expression to do this. I think the syntax would be regex(.,'^\d{1,2}"/"\d{1,2}"/"\d{4}$'). I also am not sure which column this would be placed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help with this is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Anderson&lt;/P&gt;&lt;P&gt;Florida Fish and Wildlife Conservation Commission&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Sep 2019 14:10:31 GMT</pubDate>
    <dc:creator>Chris_Anderson</dc:creator>
    <dc:date>2019-09-26T14:10:31Z</dc:date>
    <item>
      <title>Formatting a dateTime in Web Form similar to InputMask</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/formatting-a-datetime-in-web-form-similar-to/m-p/863539#M26411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a public-facing survey working well using the desktop/mobile app and am modifying it to work on the Web. During the testing phase, one of testers has noted that the manual input of a date into a dateTime question allows the user to input a dates that are physically impossible (e.g. 123/4567/8901); we know a hunter somehow would input a date like this. I have tried some methods for restricting the input to MM/DD/YYYY to match the desktop/mobile app with little success. I have seen where I can use a regular expression to do this. I think the syntax would be regex(.,'^\d{1,2}"/"\d{1,2}"/"\d{4}$'). I also am not sure which column this would be placed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help with this is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Anderson&lt;/P&gt;&lt;P&gt;Florida Fish and Wildlife Conservation Commission&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2019 14:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/formatting-a-datetime-in-web-form-similar-to/m-p/863539#M26411</guid>
      <dc:creator>Chris_Anderson</dc:creator>
      <dc:date>2019-09-26T14:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting a dateTime in Web Form similar to InputMask</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/formatting-a-datetime-in-web-form-similar-to/m-p/863540#M26412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris. Thanks for posting your question. Unfortunately it is not possible to prevent a user (particularly a hunter &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt; ) to enter an incorrect date in the calendar control. However, you may want trying with a constraint. For example, what if you limit the user input through a constraint to a 'reasonable' time range?&amp;nbsp; Say for example anything between today and 1940, or anything between today and 2025, or anything between 1940 and 2025.&amp;nbsp; The syntax to create this type of constraints is described in &lt;A href="https://community.esri.com/groups/survey123/blog/2016/04/17/dates-and-time-in-survey123-for-arcgis"&gt;https://community.esri.com/groups/survey123/blog/2016/04/17/dates-and-time-in-survey123-for-arcgis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The constraint will not prevent the user to enter an incorrect date, but will prevent the user from submitting the data until the date is within range (no pun intended).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, &lt;A href="https://www.wtvy.com/content/news/New-rule-changes-for-the-2019-2020-Florida-hunting-season-559941711.html"&gt;congrats for your work&lt;/A&gt; with Survey123 at the Florida Fish and Wildlife Conservation Commission.&amp;nbsp; Really nice job!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2019 15:59:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/formatting-a-datetime-in-web-form-similar-to/m-p/863540#M26412</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2019-09-26T15:59:03Z</dc:date>
    </item>
  </channel>
</rss>

