Avatar

Level 10

You can do this with FormCalc in the exit:Event of the date field.

var Input = Num2Date(Date2Num($.formattedValue, "DD/MM/YYYY"), "YYYY")

     if (Input ne 2010) then

     xfa.host.messageBox("Wrong Year selected")

endif