<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Date time component in interface</title><link>https://community.appian.com/discussions/f/rules/34966/date-time-component-in-interface</link><description>Hi All, 
 I am using a date time component inside the interface. But it also accepting the special characters if we enter manually. After submitting, it is displaying the system date. 
 Eg: I gave 12/06/2024 * 5:00 PM. After submitting it is displaying</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135286?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 14:03:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:20080a0e-620b-4c4e-ad40-da9550d98962</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;FWIW this doesn&amp;#39;t appear to actually be doing what you&amp;#39;re intending it to do.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The dataTime field doesn&amp;#39;t actually save any particular value into its target until a valid (complete) date and time is passed in.&amp;nbsp; I believe your RegEx is just validating against a blank input (as in returning a false positive for an error).&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715694831494v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The thing is, the dateTime field starts evaluating the validations parameter as soon as either side is filled, but this is before the target variable has actually been passed any value.&amp;nbsp; So any value added at all will cause a validation that matches on a blank value to fire, such as:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715695047396v3.png" alt=" " /&gt;&lt;br /&gt;(note how local!dateTime still holds no value here).&lt;/p&gt;
&lt;p&gt;This functionally works the same as the original input with special characters added - it causes no data to actually be passed, apparently:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715695121794v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Interestingly, this behavior changes when we mark the field as &amp;quot;required&amp;quot;:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715695295551v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But this opens the door to it seemingly working *correctly* (if somewhat unintuitively) when we now click a &amp;quot;submit&amp;quot; button - at least it recognizes there is no value where a required one was expected.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715695367864v6.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135263?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 06:58:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e424c2a5-57d8-413b-9859-7460f2cac9ea</guid><dc:creator>srinivaasant574373</dc:creator><description>&lt;p&gt;That is working as expected but the validation message is showing before providing the time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;anyway we are fine with that. Thank you for your response&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135262?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 06:54:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a2c91c36-f53f-4009-84a0-c175244ea1df</guid><dc:creator>Shubham Aware</dc:creator><description>[quote userid="72412" url="~/discussions/f/rules/34966/date-time-component-in-interface/135261"]I tried using null check but in Pic 1 and 3 in both scenarios it will be null&amp;nbsp;[/quote]
&lt;p&gt;&lt;span&gt;We are displaying validation for the user to remove special characters from the date.&lt;/span&gt;&lt;span&gt; When the user removes those characters,&lt;/span&gt;&lt;span&gt; the value becomes available in a variable.&lt;/span&gt;&lt;span&gt; Is this not happening?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135261?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 06:37:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0702c1ed-596e-4c69-9064-1702e54ec09a</guid><dc:creator>srinivaasant574373</dc:creator><description>&lt;p&gt;&amp;nbsp;,It is working but before providing the time it is throwing validation message. After time is provided the validation is disappeared.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715668416888v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715668456877v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715668495310v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I tried using null check but in Pic 1 and 3 in both scenarios it will be null&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135257?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 06:09:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:895ea32c-7935-4679-8b92-3354460f6ce8</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;You should restrict users from adding special characters. I&amp;#39;ve implemented validation using a regular expression to catch some special characters. I recommend implementing a similar approach for your validation.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!dateTime,
  {
    a!dateTimeField(
      label: &amp;quot;Date &amp;amp; Time&amp;quot;,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      value: local!dateTime,
      saveInto: local!dateTime,
      validations: if(
        regexmatch(
          tostring(local!dateTime),
          &amp;quot;[$&amp;amp;+,;=?@#&amp;#39;&amp;lt;&amp;gt;.^*()%!]$&amp;quot;
        ),
        &amp;quot;Special Character Found&amp;quot;,
        {}
      )
    )
  }
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Keep me posted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135256?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 05:36:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1149aaa5-1e7d-42f1-89c7-8753b5e7ce7e</guid><dc:creator>srinivaasant574373</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715664787967v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;By default we are storing created on date if it is null. If we provide any special characters inside the date time component it is taking it as null.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715664956231v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Is there a way to restrict users entering special characters inside the component?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135255?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 05:25:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:43a87d25-e5ec-400c-823d-1a8c8637af77</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&amp;nbsp;Could you help us with code snippet?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135254?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 04:31:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d73a4c75-68ad-493d-bc46-6c49ec70131a</guid><dc:creator>srinivaasant574373</dc:creator><description>&lt;p&gt;We have written a code to display the value as some default date if the value is null. Is there a way to restrict the user entering special characters inside a date time component ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135248?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 18:02:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:67c2458a-4211-4afc-b705-b5f1be2d9fed</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;If I try this, the date time fields just does not accept my entered values.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1715623269123v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;You wrote:&amp;nbsp;&amp;quot;&lt;span&gt;After submitting, &lt;/span&gt;it is displaying the system date&amp;quot;. What exactly do you mean with &amp;quot;it&amp;quot; and &amp;quot;system time&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Date time component in interface</title><link>https://community.appian.com/thread/135247?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 17:45:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2e6d58d0-dfa5-4a4f-82b3-6dce35150486</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;If you can reproduce that behavior readily, you should open a support case with Appian and report it as unintended behavior (and possibly as a bug).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>