Question

Deactivating future dates in calendar

  • 6 January 2021
  • 3 replies
  • 77 views

Badge +2

There is a requirement to disable the future dates in a calendar on a date data field. 
I didn’t find any method regarding this in the internal documentation.
Is it possible to achieve this using IFS control?
Could anyone please assist me on this.


This topic has been closed for comments

3 replies

Userlevel 7
Badge +28

In relation to what module?  That requirement is very unclear.  Customer Orders have to be dated in the future.  Purchase Orders have to be dated in the future.  Shop Orders have to be dated in the future.  Even things like posting controls, payment due dates and many other things only make sense in the future.  MRP runs into the future, Scheduled Database Tasks are always in the future.

 

If there is a specific date field that for some business reason can only be today or in the past (I can’t think what this would be), you could create a custom event to prevent saving the record, but only if there is a particular possibility of trapping that save event.

Badge +2

There is a specific date field for which I need to greyed out the future dates.
How to create a custom event on calendar?

Userlevel 7

There is a specific date field for which I need to greyed out the future dates.
How to create a custom event on calendar?

It’s not possible to ‘grey out’ dates in the calendar control through config. You can create a custom event to stop users from saving if they select a date beyond what you think is allowed.

A basic example below (hard to be specific as you haven’t mentioned the rules or logical units).
 

BEGIN

IF &NEW:DATE_ENTERED > &DATE_ALLOWED THEN

Error_SYS.Appl_General('LogicalUnit', 'ERROR: You are not allowed to save a record where the date is greater than &DATE_ALLOWED');

END IF;

END;