How to disable back date on Due Date calendar at the time of task creation in work flows

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

How to disable back date on Due Date calendar at the time of task creation in work flows

Hi..

    How to disable back date on due date calendar at the time of task creation in work flows, Please Some one help me

Thanks

Leela N 

7 Replies
Highlighted
Established Member

Re: How to disable back date on Due Date calendar at the time of task creation in work flows

Hi

Alfresco uses YUI datepicker control (API: calendar YAHOO.widget.Calendar (YUI Library) ). 


In YUI datepicker control, if you want to disabled past date (ex. dates before some date), you need to set 'mindate' property. 

You can find Alfresco usage of YUI date picker component in \tomcat\webapps\share\components\form\date-picker.js file. Somehow I could not find usage if 'mindate' in this js file. just for trail purpose, I simple set this property in 'DatePicker_onReady()' function as follow, 

.....

....

this.widgets.calendar.cfg.setProperty("pagedate", page);
this.widgets.calendar.cfg.setProperty("selected", selected);
this.widgets.calendar.cfg.setProperty("mindate", "01/01/2018");

...

...

and I could disabled dates before "01/01/2017".

Since you can not set this property in existing date picker control in Alfresco, I think you can consider to extend this component and set 'mindate' property

hope this would be helpful

-

Jayesh Prajapati,
www.enprowess.com

Highlighted
Active Member II

Re: How to disable back date on Due Date calendar at the time of task creation in work flows

its not working for me...

Highlighted
Established Member

Re: How to disable back date on Due Date calendar at the time of task creation in work flows

did you generated date-picker.min.js file?  

Highlighted
Active Member II

Re: How to disable back date on Due Date calendar at the time of task creation in work flows

no..sir

Highlighted
Active Member II

Re: How to disable back date on Due Date calendar at the time of task creation in work flows

how to generate date-picker.min.js..?? 

Highlighted
Established Member

Re: How to disable back date on Due Date calendar at the time of task creation in work flows

just for testing, rename it to date-picker.min.js.txt Smiley Happy. this is for quick hack may not be good practice to follow always. 

Highlighted
Active Member II

Re: How to disable back date on Due Date calendar at the time of task creation in work flows

k...thank u