I need a validation functionality for two date fields which should show an error if days between days <15 or >45 in VF page.
This is the backend validation:
(End_Date__c - Start_Date__c ) < 15 || (
End_Date__c - Start_Date__c ) > 45
I just want Front-end validation for above validation rule? can anyone suggest me because I'm not good at javascript
Here is the vf code:
<apex:actionRegion >
<section id="myinformation-content">
<article>
<dl class="col-1">
<dt><b style="color:red;">*</b>start date </dt>
<dd> <apex:inputField id="startdate" value="{!caseRecord.Start_Date__c}"/></dd>
</dl>
<dl class="col-1">
<dt><b style="color:red;">*</b>end date</dt>
<dd> <apex:inputField id="enddate" value="{!caseRecord.End_Date__c}"/></dd>
</dl>
</article>
</section>