cancel
Showing results for 
Search instead for 
Did you mean: 

Date Picker Control?

vinutha
Champ in-the-making
Champ in-the-making

Hi

I have disabled  the previous dates in workflow calendar, hence the same format is reflecting in the metadata date calendar format. Kindly help me to get back the original calendar format in metadata date calendar format.

Regards

Vinutha M P

6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator

Please elaborate on what you have done to disable "previous dates in workflow calendar" - I do not understand what you mean by that / what specifically you have done, and without that it is impossible to answer any question.

vinutha
Champ in-the-making
Champ in-the-making

Under Task-workflow I've Started-Start Workflow, Here in the duedate tag i have disabled the previous dates.But this change is reflecting all over the alfresco platform.Kindly help me to disable only in that particular workflow.

afaust
Legendary Innovator
Legendary Innovator

It's still just gibberish to me. Maybe you can illustrate with one or two screenshots.

vinutha
Champ in-the-making
Champ in-the-making

In screenshot you can see, I have disabled the previous dates that to especially for workflow calendar. So this change is reflecting all over the calendar of alfresco platform.Kindly help me to disable only in that particular workflow.

vinutha
Champ in-the-making
Champ in-the-making

In order to disable the previous dates in calendar,I have added the following code.

In date-picker.js file, inside the construct the picker

as this.widgets.calendar.cfg.setProperty("mindate", selected); and also have added the code in date-picker-min.js file as this.widgets.calendar.cfg.setProperty("mindate",s);

But the change is reflecting all over the calendar of alfresco platform.Kindly help me to disable only in that particular workflow.

Regards

Vinutha M P

afaust
Legendary Innovator
Legendary Innovator

Now it makes sense - you disallowed selecting dates in the past. Well, in order to avoid having your changes affect all of Alfresco, you should not adapt / modify the original Alfresco date picker, but instead implement your own form control with custom client-side JavaScript that provides your restricted picker. Most of it can basically be a 1-to-1 copy, though it should have its own component namespace. Then, you'd need to configure every date field in workflow forms where you want your restriction to apply to use your custom field.

Alternatively, simply adapt the default form control to take a parameter so the feature is configurable, and then again, configure every date field in workflow forms where you want your restriction to apply to use that parameter to enable it.