0

I'm trying to trigger a Fuel UX datepicker's change event using this JS:

$('#dpFechaDesde').datepicker({
    allowPastDates: true
}).on('changed.fu.datepicker', function (event, date) {
    alert('hola');
});

For some reason the alert doesn´t show.

For more information see this fiddle.

Barrios
  • 75
  • 1
  • 2
  • 9

1 Answers1

0

Thank you for bringing this to the Fuel UX team's attention. The event is not named well.

If you read closely in the datepicker event documentation it says

This event is fired when the date value has been changed by the user. Arguments include event, date where date is a JavaScript Date object.

changed.fu.datepicker is only fired on input blurred (that is clicking or tabbing out of text input). Sorry, for the confusion. You will need to use other events if you are changing the date programatically.

  • Thanks for answering. I managed to do what I wanted by following this [link](https://github.com/ExactTarget/fuelux/issues/655) – Barrios Apr 20 '15 at 20:12