<?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>Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/discussions/f/user-interface/37760/grey-out-particular-dates-and-weekends-in-date-selection-field</link><description>Hello everyone, 
 I have a requirement where I should be able to grey out the weekends for the user while selecting any date on a date field. Also, they have some list of standard specific dates where the calender should be greyed out. Can anyone help</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/thread/141887?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 06:23:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b8c87e07-fba2-4bd6-9a63-7614bc0a1739</guid><dc:creator>baji mekala</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/manikumarib1567"&gt;MK0001&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Date Picker Field does not support this feature.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you have a look at this code once it may help you&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!toDate,
  local!months: {
    &amp;quot;JANUARY&amp;quot;,
    &amp;quot;FEBRUARY&amp;quot;,
    &amp;quot;MARCH&amp;quot;,
    &amp;quot;APRIL&amp;quot;,
    &amp;quot;MAY&amp;quot;,
    &amp;quot;JUNE&amp;quot;,
    &amp;quot;JULY&amp;quot;,
    &amp;quot;AUGUST&amp;quot;,
    &amp;quot;SEPTEMBER&amp;quot;,
    &amp;quot;OCTOBER&amp;quot;,
    &amp;quot;NOVEMBER&amp;quot;,
    &amp;quot;DECEMBER&amp;quot;
  },
  local!weekDays: {
    &amp;quot;MON&amp;quot;,
    &amp;quot;TUE&amp;quot;,
    &amp;quot;WED&amp;quot;,
    &amp;quot;THU&amp;quot;,
    &amp;quot;FRI&amp;quot;,
    &amp;quot;SAT&amp;quot;,
    &amp;quot;SUN&amp;quot;
  },
  local!date: date(
    year(local(now())),
    month(local(now())),
    day(local(now()))
  ),
  local!month: month(local!date),
  local!year: year(local!date),
  local!daysInMonth: daysinmonth(local!month, local!year),
  local!startDay: weekday(date(local!year, local!month, 1), 2),
  local!endDay: weekday(eomonth(local!date, 0), 2),
  local!dates: a!forEach(
    items: enumerate(local!daysInMonth),
    expression: date(local!year, local!month, fv!index)
  ),
  local!leftPad: reverse(
    todate(
      a!forEach(
        items: enumerate(local!startDay - 1),
        expression: a!subtractDateTime(
          date(local!year, local!month, 1),
          0,
          0,
          fv!index
        )
      )
    )
  ),
  local!rightPad: todate(
    a!forEach(
      items: enumerate(7 - local!endDay),
      expression: a!addDateTime(
        date(
          local!year,
          local!month,
          local!daysInMonth
        ),
        0,
        0,
        fv!index
      )
    )
  ),
  local!finalDates: a!flatten(
    {
      local!leftPad,
      local!dates,
      local!rightPad
    }
  ),
  local!maxRows: length(local!finalDates) / 7,
  a!sectionLayout(
    contents: {
      a!cardLayout(
        padding: &amp;quot;NONE&amp;quot;,
        contents: {
          a!richTextDisplayField(
            value: {
              a!richTextIcon(
                icon: &amp;quot;angle-left&amp;quot;,
                link: a!dynamicLink(
                  saveInto: {
                    a!save(
                      local!month,
                      if(local!month = 1, 12, local!month - 1)
                    ),
                    a!save(
                      local!year,
                      if(local!month = 12, local!year - 1, local!year)
                    ),
                    a!save(
                      local!date,
                      date(local!year, local!month, 1)
                    )
                  }
                ),
                linkStyle: &amp;quot;STANDALONE&amp;quot;,
                size: &amp;quot;MEDIUM&amp;quot;
              ),
              a!richTextItem(
                text: &amp;quot;   &amp;quot; &amp;amp; local!months[local!month] &amp;amp; &amp;quot;  &amp;quot; &amp;amp; local!year &amp;amp; &amp;quot;   &amp;quot;,
                size: &amp;quot;MEDIUM&amp;quot;,
                style: &amp;quot;STRONG&amp;quot;
              ),
              a!richTextIcon(
                icon: &amp;quot;angle-right&amp;quot;,
                link: a!dynamicLink(
                  saveInto: {
                    a!save(
                      local!month,
                      if(local!month = 12, 1, local!month + 1)
                    ),
                    a!save(
                      local!year,
                      if(local!month = 1, local!year + 1, local!year)
                    ),
                    a!save(
                      local!date,
                      date(local!year, local!month, 1)
                    )
                  }
                ),
                linkStyle: &amp;quot;STANDALONE&amp;quot;,
                size: &amp;quot;MEDIUM&amp;quot;
              )
            },
            align: &amp;quot;CENTER&amp;quot;
          )
        },
        style: &amp;quot;#1d659c&amp;quot;,
        marginBelow: &amp;quot;EVEN_LESS&amp;quot;
      ),
      a!columnsLayout(
        columns: {
          a!forEach(
            items: local!weekDays,
            expression: a!columnLayout(
              contents: {
                a!cardLayout(
                  padding: &amp;quot;NONE&amp;quot;,
                  contents: {
                    a!richTextDisplayField(
                      value: {
                        a!richTextItem(
                          text: fv!item,
                          size: &amp;quot;SMALL&amp;quot;,
                          style: &amp;quot;STRONG&amp;quot;
                        )
                      },
                      align: &amp;quot;CENTER&amp;quot;
                    )
                  }
                )
              }
            )
          )
        },
        marginBelow: &amp;quot;NONE&amp;quot;,
        spacing: &amp;quot;NONE&amp;quot;,
        stackWhen: &amp;quot;NEVER&amp;quot;
      ),
      a!forEach(
        items: enumerate(local!maxRows),
        expression: a!columnsLayout(
          columns: {
            a!localVariables(
              local!index: fv!item,
              a!forEach(
                items: enumerate(7),
                expression: a!localVariables(
                  local!calendarDate: local!finalDates[(local!index * 7) + fv!index],
                  {
                    a!columnLayout(
                      contents: {
                        {
                          a!cardLayout(
                            padding: &amp;quot;EVEN_LESS&amp;quot;,
                            showWhen: month(local!calendarDate) = month(local!date),
                            contents: {
                              a!columnsLayout(
                                columns: {
                                  a!columnLayout(
                                    contents: {
                                      a!sideBySideLayout(
                                        items: {
                                          a!sideBySideItem(item: {}, width: &amp;quot;MINIMIZE&amp;quot;),
                                          a!sideBySideItem(
                                            item: a!richTextDisplayField(
                                              value: {
                                                a!richTextItem(
                                                  text: day(local!calendarDate),
                                                  showWhen: month(local!calendarDate) = month(local!date),
                                                  size: &amp;quot;SMALL&amp;quot;,
                                                  
                                                )
                                              },
                                              align: &amp;quot;RIGHT&amp;quot;
                                            )
                                          )
                                        },
                                        showWhen: month(local!calendarDate) = month(local!date)
                                      ),
                                      
                                    }
                                  )
                                }
                              )
                            },
                            style: if(or(fv!index = { 6, 7 }), &amp;quot;#808080&amp;quot;, {})
                          )
                        }
                      }
                    )
                  }
                )
              )
            )
          },
          marginBelow: &amp;quot;NONE&amp;quot;,
          spacing: &amp;quot;NONE&amp;quot;,
          stackWhen: &amp;quot;NEVER&amp;quot;
        )
      )
    }
  )
)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/thread/141881?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 05:55:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9cd6ca09-377b-48bf-8109-0f3242fe2371</guid><dc:creator>Prasanta Paul</dc:creator><description>&lt;p&gt;You can use validations or customize calendar to achieve this.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/thread/141863?ContentTypeID=1</link><pubDate>Sat, 19 Oct 2024 12:25:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:852f6207-e6b5-499c-8d88-898ff5d38698</guid><dc:creator>Soma</dc:creator><description>&lt;p&gt;Disabling dates in the calendar is not possible in Appian&amp;#39;s Date field. There are two&amp;nbsp;alternatives&lt;/p&gt;
&lt;p&gt;1. Display validations when user selects certain dates&lt;/p&gt;
&lt;p&gt;2. Create your own calendar using OOTB components and you can customise as you wish.&lt;/p&gt;
&lt;p&gt;Please refer this thread for quick start&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/discussions/f/new-to-appian/30375/how-to-create-calendar-component-using-card-layout-and-display-the-attendance-marked-leaves-taken-and-current-date-in-different-color-coding"&gt;community.appian.com/.../how-to-create-calendar-component-using-card-layout-and-display-the-attendance-marked-leaves-taken-and-current-date-in-different-color-coding&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/thread/141857?ContentTypeID=1</link><pubDate>Sat, 19 Oct 2024 09:56:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:434d292f-675b-494b-bc9e-cc318af20140</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;+1 for validations. I would advise against buillding a custom component for this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/thread/141851?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 16:36:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ea2d18eb-130b-420b-b216-2c6ef70f57c4</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I&amp;#39;d suggest you use standard field validations.&amp;nbsp; The real only alternative is to build your own novel calendar picker component (you could probably cobble something together using card Layout items arranged in tiles, etc).&amp;nbsp; If you have no idea how to do that, then I suggest just sticking with validations, as it&amp;#39;s fairly straightforward.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/thread/141850?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 16:29:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:527ca91a-49a5-4eff-a158-205107a9e833</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&lt;a href="/members/manikumarib1567"&gt;MK0001&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="276052" url="~/discussions/f/user-interface/37760/grey-out-particular-dates-and-weekends-in-date-selection-field"]I should be able to grey out the weekends for the user while selecting any date on a date field.[/quote]
&lt;p&gt;Appian Date Picker Field does not support this feature.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Grey out particular dates and weekends in Date selection field</title><link>https://community.appian.com/thread/141848?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2024 15:43:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:86c7027f-1325-4743-a62f-0f6cc1b67411</guid><dc:creator>Yogi Patel</dc:creator><description>&lt;p&gt;&lt;span&gt;As far as I know, you can&amp;#39;t grey out dates in date fields. You can use validation to achieve similar things(to restrict date selection).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>