Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda