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

Problem if CI > default CO #14

Open
AndreyBragin opened this issue Jan 24, 2019 · 0 comments
Open

Problem if CI > default CO #14

AndreyBragin opened this issue Jan 24, 2019 · 0 comments

Comments

@AndreyBragin
Copy link

Hello thx for ur grate work! I have the problem) When i select checkin date and it more than checkout date, input with checkout date cleared. I was tried event "onChangeCI" and tried update with method 'updateCO' this give me error: Uncaught TypeError: Cannot set property 'innerHTML' of undefined. May be i'm doing something wrong ?) Can u help me?

This my code: `let datePicker = $('.t-datepicker');

let today = new Date();
let tomorrow = new Date();

tomorrow.setDate(today.getDate() + 1);
let getCheckIn = datePicker.find('input[name=checkin]').attr('data-value');
let getCheckOut = datePicker.find('input[name=checkout]').attr('data-value');

datePicker.tDatePicker({
startDate: today,
limitDateRanges: 31,
titleToday: 'Сегодня',
titleDays: ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'],
titleMonths: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
iconArrowTop: false,
iconDate: '',
titleDateRange: '',
titleDateRanges: '',
titleCheckIn: '',
titleCheckOut: '',
dateCheckIn: getCheckIn ? getCheckIn : today,
dateCheckOut: getCheckOut ? getCheckOut : tomorrow,

}).on('onChangeCI', function (e, changeDateCI) {
datePicker.tDatePicker('updateCO', '2019-01-31')
});`

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