I am writing an appointment request module. We want to restrict access to the module to certain times monday through friday and other times during the weekends . I was thinking of a simple javascript that triggers on pressing a button on the main screen which triggers a validation based on time and date but am not sure what functions velo has . As well we would need to restrict access to the rest of the webpages until this validation check is done
something like
access=.f.
do case
case dayofweek is between M-F and access time is between 3-9
access is true
case dayofweek if sat and access time is between 7-3
access =.t.
case dayofweekis sunday …
case date={23/11/2023} (thanksgiving we are closed
endcase
if access ->let them in
else
trigger error message
endif
we could also do a database lookup
does velo have date and time functions such as date() dow() etc
and between(time() timeopen, timeclosed)
thanks