Всем привет! не работает валидация для календаря query.datepick.js.
Подскажите пожалуйста, что не так делаю?
<!--календарь-->
<link href="<?php echo base_url(); ?>asset/calendar/flora.datepick.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo base_url();?>asset/calendar/jquery.datepick.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>asset/calendar/jquery.datepick-ru.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>asset/calendar/jquery.datepick.validation.min.js"></script>
<script type="text/javascript">
$(function() {
$('#birthday').datepick({
defaultDate: '-30y',
minDate: '01.01.1920',
maxDate: '-18y',
yearRange: '1920:-18y',
showOnFocus: false,
showTrigger: '#calImg'});
$('.calendar').datepick({
maxDate: new Date(),
showOnFocus: false,
showTrigger: '#calImg'});
$.datepick.setDefaults({validateDate: 'Not a date',
birthday: 'Nope, from {0} to {1}'});
$('#form_data_input').validate({
errorPlacement: $.datepick.errorPlacement,
rules: {
birthday: {
required: true,
dpDate: true
}
}
});
});
</script>
<input type="text" id="birthday" name="birthday" class=" dpDate " size="15">
<div style="display: none;">
<img id="calImg" class="trigger" alt="Popup" src="'.base_url().'asset/calendar/calendar-green.gif">
</div>