<?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 Re: Validate the Effectivity date Aspect in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/validate-the-effectivity-date-aspect/m-p/205293#M158423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We resolved this issue by modifying code in the &lt;/SPAN&gt;&lt;EM style="color: #0000BF;"&gt;org.alfresco.web.ui.common.renderer.DatePickerRenderer&lt;/EM&gt;&lt;SPAN&gt; class. This is the class that renders the date/datetime picker widget in case of the effective date aspect in addition to other areas of the application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We created a new javascript file, which retrieves the values for the date, month, and year from the form and applies the relevant date validations on these values. In our case the validations included the following.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) February should not have more than 28 days (29 days in a leap year).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) April, June, September, and November should not have more than 30 days.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) February should have 29 days only in a leap year.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We added the following line in the &lt;/SPAN&gt;&lt;EM style="color: #0000BF;"&gt;encodeBegin&lt;/EM&gt;&lt;SPAN&gt; method to include this newly created javascript file. This line was added right after the disabled check section in the method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:#0000BF;"&gt;out.write("&amp;lt;script type=\"text/javascript\" src=\"/alfresco/scripts/dateValidation.js\"&amp;gt;&amp;lt;/script&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next, we added the following for each of the drop down selects (i.e. day/month/year) in the &lt;/SPAN&gt;&lt;EM style="color: #0000BF;"&gt;renderMenu&lt;/EM&gt;&lt;SPAN&gt; method in the class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:#0000BF;"&gt;out.write(" onChange=\"validateDate('" + clientId + "');\" ");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This line would ensure that the date is checked every time any of the values are changed in the date picker widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Feb 2009 05:09:51 GMT</pubDate>
    <dc:creator>arjun</dc:creator>
    <dc:date>2009-02-24T05:09:51Z</dc:date>
    <item>
      <title>Validate the Effectivity date Aspect</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/validate-the-effectivity-date-aspect/m-p/205292#M158422</link>
      <description>hi all,I have added the effectivity aspect to the space and subsequently to the items in the space, when I try to do a add content on the space I am able to select an invalid date from the effectivity dropdowns and able to set it, however internally alfresco does its own calculations and sets a vali</description>
      <pubDate>Tue, 17 Feb 2009 03:58:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/validate-the-effectivity-date-aspect/m-p/205292#M158422</guid>
      <dc:creator>abirb</dc:creator>
      <dc:date>2009-02-17T03:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Validate the Effectivity date Aspect</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/validate-the-effectivity-date-aspect/m-p/205293#M158423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We resolved this issue by modifying code in the &lt;/SPAN&gt;&lt;EM style="color: #0000BF;"&gt;org.alfresco.web.ui.common.renderer.DatePickerRenderer&lt;/EM&gt;&lt;SPAN&gt; class. This is the class that renders the date/datetime picker widget in case of the effective date aspect in addition to other areas of the application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We created a new javascript file, which retrieves the values for the date, month, and year from the form and applies the relevant date validations on these values. In our case the validations included the following.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) February should not have more than 28 days (29 days in a leap year).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) April, June, September, and November should not have more than 30 days.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) February should have 29 days only in a leap year.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We added the following line in the &lt;/SPAN&gt;&lt;EM style="color: #0000BF;"&gt;encodeBegin&lt;/EM&gt;&lt;SPAN&gt; method to include this newly created javascript file. This line was added right after the disabled check section in the method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:#0000BF;"&gt;out.write("&amp;lt;script type=\"text/javascript\" src=\"/alfresco/scripts/dateValidation.js\"&amp;gt;&amp;lt;/script&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next, we added the following for each of the drop down selects (i.e. day/month/year) in the &lt;/SPAN&gt;&lt;EM style="color: #0000BF;"&gt;renderMenu&lt;/EM&gt;&lt;SPAN&gt; method in the class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:#0000BF;"&gt;out.write(" onChange=\"validateDate('" + clientId + "');\" ");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This line would ensure that the date is checked every time any of the values are changed in the date picker widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2009 05:09:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/validate-the-effectivity-date-aspect/m-p/205293#M158423</guid>
      <dc:creator>arjun</dc:creator>
      <dc:date>2009-02-24T05:09:51Z</dc:date>
    </item>
  </channel>
</rss>

