Tushar Ghosh
Tushar Ghosh

Reputation: 1022

jquery mask input plugin only set day value of the date

I am using masked-input-plugin. Only day part need to change but month and year not need to change. Here is my code.

$("#id").mask("99/06/2017",{placeholder:"dd/mm/yyyy"});

During the input time : it seeing like dd/06/2017 but if I select the input box then remove the cursor(without pressing any number) that time it's show something like as 06/06/2017

I have seen this question and answer

I am very sorry for my poor English.

Thanks in advance.

Upvotes: 0

Views: 1495

Answers (2)

Tushar Ghosh
Tushar Ghosh

Reputation: 1022

At last, I am able to solve the problem. I am posting this answer, so anybody can get help.

Firstly, extend the mask function of the mask input plugin. Then customized some code to solve this problem.

For the solution please visit this link

Upvotes: 0

ImranGalib
ImranGalib

Reputation: 114

Make use of

$('#dob').mask("00/00/0000",{placeholder:"dd/mm/yyyy"});

this will solve your problem

Upvotes: 2

Related Questions