Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calendar is not displayed correctly in a modal #133

Open
JoaquinDelPrado opened this issue Jan 16, 2019 · 0 comments
Open

calendar is not displayed correctly in a modal #133

JoaquinDelPrado opened this issue Jan 16, 2019 · 0 comments

Comments

@JoaquinDelPrado
Copy link

JoaquinDelPrado commented Jan 16, 2019

I have a table inside the modal and inside the table in a row I have a button that shows the calendar, but it does not show correctly after the second click. y think the problem its the scroll

here's my code:
// Aparición de modal y manejo de calendario semantic ui
$('#cotizar_btn').click(function(){
$('.ui.modal').modal('show');
valInputDate();
// Calendario listo para usarse en cualquier lado
$('.ui.calendar').calendar({
type: 'date',
onChange(date, text, mode){
let day = date.getDate();
let month = date.getMonth() + 1;
let year = date.getFullYear();

            if (day < 10) {
                day = '0' + day;
            } 
            if (month < 10) {
                month = '0' + month;
            } 
            
            let finalDate = `${year}/${month}/${day}`;
            let currentId = $(this).closest("tr").attr("id");
            let final = `${currentId}_${finalDate}`;
            $(this).closest('tr').find('#identifier').attr("name", final);
            $(this).closest('tr').find('.date_doc').text(finalDate);
            $(this).closest('tr').find('.date_doc').css('background-color', '#DAF7A6');
            // console.log( final );
                  
            valInputDate();     
        },
        minDate: new Date(),
        popupOptions: {
            position: 'right center',
            lastResort: 'right center',
            observeChanges: false
        },
        text: {
            days: ['L', 'M', 'M', 'J', 'V', 'S', 'D'],
            months: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiebre', 'Octubre', 'Noviembre', 'Diciembre'],
            monthsShort: ['En', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
            today: 'Hoy',
            now: 'Ahora',
            am: 'AM',
            pm: 'PM'
        },
    });
    //Calendario fin
});

screenshot from 2019-01-16 16-44-03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant