Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
Date picker window is not close

I have a date picker but When I clicked date picker input and if I didn't choise any date then when I go outside the input, date picker window is not close. Also this problem just is there in IE.

My code is below;

  @Html.TextBox("Birthdate", null, new { @class = "form-control date-picker input-mask-date", placeholder = "Doğum Tarihi", required = true, id = "dtBirthDate" })

Script side;

$(".input-mask-date").mask("99.99.9999");

if I didn't choise any date then when I go outside the input, date picker window is not close.

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

As you mentioned this is an issue with IE. However, you can add a custom function to check when one leaves or clicks outside the datepicker to hide it.

$('.date-picker').on('blur', function() {
  $('.date-picker').unmask();
});

You can equally use focusOut for the event listener and also fadeOut / slideUp if they work on date pickers.

So as mentioned by @caglarboran, the right method to call is unmask rather than hide. Edited the answer.

about 4 years ago · Juan Pablo Isaza Report

0

I solved this problem like that;

$('#dtBirthDate').on('focus', function () {
    $(this).mask("99.99.9999");
});

$("#dtBirthDate").focusout(function () {
    $(this).unmask();
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!