Hi, i’ve been problems with calendar, i’ve used with popup events and page events but when i go to other page and go again to inicio page when i click the calendar this is duplicated for each time that i go and back to inicio page
this is my code
$$(document).on('page:beforein', '.page[data-name="inicio"]', function (e) {
var calendarModal = app.calendar.create({
inputEl: '#demo-calendar-modal',
openIn: 'popover',
footer: true,
dateFormat: 'yyyy-mm-dd',
monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto' , 'Septiembre' , 'Octubre', 'Noviembre', 'Diciembre'],
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado'],
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'],
header: true,
headerPlaceholder: 'Seleccionar fecha',
closeOnSelect: true
});
});
$$(’.popup_solicitar_servicio’).on(‘popup:closed’, function (e, popup) {
app.calendar.close(’#demo-calendar-modal’);
app.calendar.destroy(’#demo-calendar-modal’);
app.picker.close(’#hora_servicio’);});