ProcessMaker code contributions
By HeshanKaru1994
#824227
I would like to validate datetime control. Initially the current month should be used to this process.

If the current month between Jan-June then July to Dec should be disabled.
If the current month between July-Dec then Jan to June should be disabled.

Can I know whether this is possible

Thank you
User avatar
By amosbatto
#824247
Are you limiting the date to the current year?

Create the following trigger:
Code: Select all
$nMonth = (int) date("m");
if (nMonth < 7) {
    @@minDate = date("Y-01-01"); //Y will be replaced with the current year
    @@maxDate = date("Y-06-30"); 
}
else {
    @@minDate = date("Y-07-01"); 
    @@maxDate = date("Y-12-31");
} 
Set this trigger to fire before the Dynaform containing the datatime field.

Then, in the properties of your datetime field, set the min date property to: @@minDate
and set the max date property to: @@maxDate

This example will help you: https://wiki.processmaker.com/3.2/Datet ... _variables
User avatar
By amosbatto
#824283
The min date and max date properties limit the dates that can be selected with the date picker and datetime fields won't let you manually enter a date outside the bound.

If you don't see that, you probably didn't set something correctly. Here is a sample process to demonstrate it:
(24.48 KiB) Downloaded 545 times

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]