how to guard whether date of birth is between 18-70

36 views
Skip to first unread message

Awesome Thing

unread,
Dec 15, 2016, 10:05:29 PM12/15/16
to bootstrap-datepicker
I want to control the use birth days or user ages and I will not allow unless their age from 18-70 which will be allow to select if not i will alert a messages to him.

I have try to call Datepicker-bootstrap events but it does not show me the alert.

$('input[name=date_of_birth]').datepicker({
format: 'yyyy-mm-dd',
autoclose: true,
setDate: new Date(),
startDate: '2010-01-01',
endDate: '2017-12-31',
singleDatePicker: true,
showDropdowns: true
}, function(start, end, label) {

alert(start);
});
Reply all
Reply to author
Forward
0 new messages