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

292
Vistas
tui.Calendar not working when I bind it to same id multiple time

I am using tui.Calendar to bind Date Picker in a model. and that model opens from different pages. The id of that textbox is the same because I am opening the same model. This Date picker is opening only on one page, not on another.

Below is the HTML

<div class="eventDate col-12 col-md-6 mt-3">
   <label class="control-label">Date</label><span class="text-danger">*</span>
   <div class="tui-datepicker-input tui-datetime-input tui-has-focus">
   <input type="text" id="txtEventDate" aria-label="Date-Time">
   <span class="tui-ico-date"></span>
   <div class="clean-date" onclick="CleanDateTimeFromField('input#txtEventDate')">
      <i class="fas fa-times"></i></div>
   </div>
 <div id="txtEvent_DateWrapper" style="margin-top: -1px;"></div
</div>

Below one is calling from different page

eventDateCalendar = GenerateDatePicker('txtEventDate', 'txtEvent_DateWrapper', new Date(), false);

JS

function GenerateDatePicker(element, wrapper, value, timePicker) {
    var container = document.getElementById(wrapper);
    var target = document.getElementById(element);
    var d = new tui.DatePicker(container, {
        date: new Date(value),
        input: {
            element: target,
            format: timePicker ? 'MM/dd/yyyy HH:mm A' : 'MM/dd/yyyy'
        },
        timepicker: timePicker ? {
            layoutType: 'tab',
            inputType: 'spinbox'
        } : false
    });
    
    return d;
}

const CleanDateTimeFromField = (inputField) => {

    jQuery(inputField).val('');

};

Please solve this issue. I am using it in .net core application

about 4 years ago · Juan Pablo Isaza
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