Hello, I have an angular application where I am using jquery scripts to implement a datapiker and a timepiker, those presented below:
Ihaveaseparatescriptforinitializingthem,whichisshownbelow:
jQuery(document).ready(function () {
$('#datepicker, .datepicker').datepicker({ dateFormat: 'dd.mm.y' });
$('.select').styler();
$('input.timepicker').timepicker({ timeFormat: 'HH:00' });
$('.radio-list__input-wrap').mousedown(function () {
changeCheck($(this));
});
$('.radio-list__input-wrap').each(function () {
changeCheckStart($(this));
});
function changeCheck(el) {
var el = el, input = el.find('input').eq(0);
if (!input.attr('checked')) {
$('.radio-list__input-wrap').each(function () {
cInput = $(this).find('input').eq(0);
if (cInput.attr('name') == input.attr('name')) {
$(this).removeClass('radio-list__item_active');
cInput.attr("checked", false);
}
});
el.addClass('radio-list__item_active');
input.attr("checked", true);
}
return true;
}
function changeCheckStart(el) {
var el = el, input = el.find('input').eq(0);
if (input.attr('checked')) {
el.addClass('active');
}
return true;
}
});