jquery prevent textbox clear

i'm using the jquery masked input plugin
http://digitalbush.com/projects/masked-input-plugin/

In my jquery code i currently set the date mask like this and it works fine:

$('.StartDate').mask("99/99/9999");

I have 3 textboxes who have class="StartDate" set on them.
So the mask gets applied to the three textboxes.

On page load they have default values of

10/12/2017
10/13/2017
10/14/2017

But I noticed that when I click the left mouse button in one of the textboxes. The default values gets cleared out from the other two textboxes.

Do you guys know what jquery event gets fired when I click inside a textbox with the left mouse button?

How do I prevent the textboxes from clearing the default values ?
LVL 1
maqskywalkerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
But I noticed that when I click the left mouse button in one of the textboxes. The default values gets cleared out from the other two textboxes.
what if you return to the control's id instead?

$("#date1").mask("99/99/9999");
$("#date2").mask("99/99/9999");
$("#date3").mask("99/99/9999");

Open in new window


try post your html here if necessary.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Anthony PangilinanDeveloperCommented:
Ryan Chong's solution should work for you. If you need to find out what JS events are bound to certain elements, this bookmarklet helps. It's a little clunky, but useful.
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
do you need further assistance here?
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
as proposed
0
maqskywalkerAuthor Commented:
Please close. Case has been resolved. Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.