• Resolved mrmet86

    (@mrmet86)


    Hello. Is it possible to return a yes / no value when a selected date is before or after a set date. Something like,

    (function(){

    var purchaseDate = fieldname6;

    var fromDate = 11/30/2024;

    if (purchaseDate < fromDate) {

    ? alert(“Current date is before November 30th.”);

    } else {

    ? alert(“Current date is after or equal to November 30th.”);

    })();

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author CodePeople2

    (@codepeople2)

    Hello @mrmet86

    Yes, that’s possible, but you must transform your data in date objects before comparing them.


    (function(){

    var purchaseDate = DATEOBJ(fieldname6, 'mm/dd/yyyy');
    var fromDate = DATEOBJ('11/30/2024', 'mm/dd/yyyy');

    if (purchaseDate < fromDate) {
    alert("Current date is before November 30th.");
    } else {
    alert("Current date is after or equal to November 30th.");
    })();

    Best regards.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.