Title: comparing date for custom validation
Last modified: March 5, 2023

---

# comparing date for custom validation

 *  Resolved [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/)
 * Hi, I want create a custom validations of a date field if is greater or equal
   to the value of other date field but seems I cannot do that because I don’t see
   any formula icon to make this validation.
 * Can you help me please?
 * Best regards

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/comparing-date-for-custom-validation/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/comparing-date-for-custom-validation/page/2/?output_format=md)

 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16534279)
 * Do you want to check if a date field is bigger than another date field? If so
   i think what you want to do is using the max and minimum date settings with formulas
   like this: [https://allinoneforms.rednao.com/using-formulas-in-field-settings/](https://allinoneforms.rednao.com/using-formulas-in-field-settings/)
 * If you still want to do validations with formulas you can do so, the conditional
   logic also support formulas, there should be a calculator icon that you can click
   to add a formula in a conditional logic.
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16534527)
 * Hi, I don’t see any calculator icon in date field to create custom validation
   by comparimg the date to other date field. For this I asked.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16537188)
 * Oh sorry the date fields didn’t have that feature. Please update you will be 
   able to add formulas in date conditions in the latest version.
 * Regards!
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16537256)
 * Ok, thanks a lot!
 * Best regards
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16618099)
 * Hi, I use the last version but I don’t see the icon on condition to compare (
   equal, grater…) 2 date fields.
 * I don’t see the same in filter settings in lookup field. For example I want lookup
   field show only some items filtering them if the date of period insert in field
   date A is included between 2 date fields of validity of the item.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16623326)
 * Err sorry probably i didn’t understand but the date field seems to have the greater
   or equal than condition
 * > [View post on imgur.com](https://imgur.com/a/jc6Jybc)
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16623608)
 * Hi,yes I know but the problem is that I cannot set as TO another date field. 
   I need to set (date) field A greater or equal than (date) field B to compare 
   the dates of these fields.
 * I hope it’s clear.
 * Best regards
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16626970)
 * Are date a and date b part of the remote form? (the form which the plugin is 
   querying)? If so unfortunately that is not possible you can only query using 
   either fixed values or dynamic values that are coming from the form that the 
   user is filling.
 * If you know this kind of information when the user is submitting the form though
   you might be able to create a hidden field with a formula and use that in the
   look up field.
 * So for example, if you have a “Form a” with two dates and you in “form b” want
   to add a look up field which retrieve only the records where the date a is bigger
   than date b you could add a hidden field in “Form a” which use a formula to save
   a 1 or a 0 if the date is bigger or not and then in the look up field use this
   hidden field to query the wanted records.
 * Regards!
    -  This reply was modified 3 years, 2 months ago by [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/).
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16627014)
 * Hi, both date fields are in the same form, no remote. Neither in this way I can
   compare like I told you.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16630522)
 * Err sorry i am still confused on what you want to do, initially in this thread
   you mentioned that you wanted to create a custom validation but then it seems
   that you want to include this in the lookup fields but it seems both dates are
   part of the local form and you don’t need to use the remote form
 * Could you please detail (if possible with a screenshot) what and where you want
   to do this to better provide you support?
 * If all you want is to send a date field to a lookup filter you can use the calculator
   icon (please check the previous screenshot that I sent to see what calculator
   icon I am referring to) and then select the date field in the form to send the
   value of the date field to the remote filter.
 * Regards!
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16630606)
 * Hi, never I talk about lookup field. Simply I want enable a custom validation
   in a date field where I make it invalid if its date is greater of date of field
   B. How can I do?
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16633831)
 * Oh my bad, you mention the lookup fields and probably i got confused or maybe
   i miss understood all together. Sorry for that.
 * If you want to use the value of a date to validate another date in a custom validation
   you can click in the calculator icon and then in the formula builder add the 
   date field, here is an example of a custom validation that validates that the
   date 1 is greater than the date 2
 * > [View post on imgur.com](https://imgur.com/PISvcnw)
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16633893)
 * Hi. This is what I did exactly but when I click on the calculator icon and click
   on field button to set the other date field I don’t see this field in the list
   proposed to select.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16641753)
 * Oh, is the datepicker inside a field container like a repeater or group panel
   field?
 *  Thread Starter [french150](https://wordpress.org/support/users/french150/)
 * (@french150)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/#post-16642512)
 * Hi, these date fields are inside the repeater.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/comparing-date-for-custom-validation/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/comparing-date-for-custom-validation/page/2/?output_format=md)

The topic ‘comparing date for custom validation’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-forms/assets/icon-256x256.gif?rev=2935720)
 * [AIO Forms - Craft Complex Forms Easily](https://wordpress.org/plugins/all-in-one-forms/)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-forms/reviews/)

 * 17 replies
 * 2 participants
 * Last reply from: [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/comparing-date-for-custom-validation/page/2/#post-16645097)
 * Status: resolved