0

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.

Tushar Ghosh
  • 942
  • 1
  • 12
  • 18

2 Answers2

2

Make use of

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

this will solve your problem

ImranGalib
  • 114
  • 6
  • This solution actually not solve the problem. It's not a proper solution. Still now I am searching the solution for this problem. – Tushar Ghosh Jun 02 '17 at 09:49
  • what is the reason you put "99/06/2017" in the masking? – ImranGalib Jun 02 '17 at 11:36
  • Please go through http://digitalbush.com/projects/masked-input-plugin/ . I just want to input the day part not the month and year part. This answer not able to solve my issue. – Tushar Ghosh Jun 02 '17 at 15:25
0

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

Tushar Ghosh
  • 942
  • 1
  • 12
  • 18