Skip to main content

Search and Top Navigation

#7451 closed bug (worksforme)

Opened June 06, 2011 03:49PM UTC

Closed June 07, 2011 10:06AM UTC

Last modified August 11, 2012 03:43PM UTC

Datepicker does not trigger Validate once date is selected

Reported by: k4t434sispho3nix Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.13
Keywords: Cc:
Blocked by: Blocking:
Description

When using both jQuery Validate and jQuery UI's datepicker the standard validation is not triggered for the Datepicker field once a user has selected a date and the datepicker closes.

Attachments (0)
Change History (5)

Changed June 06, 2011 03:51PM UTC by k4t434sispho3nix comment:1

Quick fix for this one. After messing around with Validate's timing for a while and coming up with a couple very bloated solutions, I found an easy fix for this on the Date picker end.

Simply call your datepicker like this:

$('#date').datepicker({
    onClose: function() {
        $('#date').valid();
    }
});

Changed June 06, 2011 03:55PM UTC by scottgonzalez comment:2

component: ui.coreui.datepicker

Changed June 06, 2011 04:22PM UTC by jzaefferer comment:3

Replying to [comment:1 k4t434sispho3nix]:

Quick fix for this one. After messing around with Validate's timing for a while and coming up with a couple very bloated solutions, I found an easy fix for this on the Date picker end. Simply call your datepicker like this:
> $('#date').datepicker({
>     onClose: function() {
>         $('#date').valid();
>     }
> });
> 

Is that good enough, or are you looking for an integrated solution?

Changed June 07, 2011 10:06AM UTC by jzaefferer comment:4

resolution: → worksforme
status: newclosed

Changed August 11, 2012 03:43PM UTC by omuleanu comment:5

fix that I use

d.datepicker({

onClose: function (dateText, inst) {

d.trigger('blur');

}

});