Ticket #7451 (closed bug: worksforme)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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.

Change History

comment:1 follow-up: ↓ 3 Changed 3 years ago by 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();
    }
});

comment:2 Changed 3 years ago by scott.gonzalez

  • Component changed from ui.core to ui.datepicker

comment:3 in reply to: ↑ 1 Changed 3 years ago by joern.zaefferer

Replying to 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?

comment:4 Changed 3 years ago by joern.zaefferer

  • Status changed from new to closed
  • Resolution set to worksforme

comment:5 Changed 2 years ago by omuleanu

fix that I use d.datepicker({

onClose: function (dateText, inst) {

d.trigger('blur');

}

});

Note: See TracTickets for help on using tickets.