You will need to build the logic on at selection on value request.
for factory calendars you can look at the transaction SCAL. You should be able to build something similar. You can use the tables:
THOCT: Public holiday calendar texts
TFACD: calendar definition
THOCI: Public holiday calendar.
There should be similar table from which you can get the required data.
Vikram.M