This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

bdouglasans
bdouglasans

I have two fields with name 'from' and 'to'. I need a date range where the field 'to' can not have a lower date than the 'from'. And for that I wanted to disable the smaller dates to the 'from' field. I do not have much idea of where to start and if it is possible to october.

herzgarlan22551
herzgarlan22551

Hi bren,

You can create your own validation to handle this. In your Model, use the beforeValidate() function to do your own date validation. You can use vanilla PHP or I suggest using the Carbon api to format your dates for proper validation.

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.