A DOB field is masked as below:
$('.dob').mask("??99/99/9999");
The DOB field has the following details:
<div class="formItem">
<s:date name="personBean.dob" var="formatvalue"
format="MM/dd/yyyy" />
<s:textfield key="form.common.label.dob" name="personBean.dob"
value="%{#formatvalue}" labelSeparator="" size="20" id="dob"
cssClass="required dob dateOfBirth" disabled="%{submittedFlag}" />
</div>
I am having an issue. Say, the user entered only last four digits 2000 and tab away. The value now converts to 20/00. The moment he comes back and clicks on the input field, random values are populated in that field e.g 20/00/_000. How to fix this problem?
Web Languages and StandardsWeb DevelopmentWeb Frameworks
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
I did the following changes:
<script type="text/javascript" src="template/js/jquery.js
<script type="text/javascript" src="template/js/jquery.in
<script type="text/javascript" src="template/js/jquery.in
Also changed the mask as below:
$('.dob').inputmask("mm/dd
But the problem still persists. Please advise.