How to validate start and end date in suitecrm?

Hi,
I want to give validation for start and end dates. If i choose end date less than of start date i want to throw alert. Same time i want to check click of save button.

You want to use addToValidateCallback:


    addToValidateCallback(
        'EditView', // Form Name
        'field_name', // field name
        'text', // Field type
        false, // Is required
        "Phone Number Invalid", // Message
        function() { // Callback return true if date is greater
        });
1 Like