Bug Tracker

Modify

Ticket #2098 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Datepicker - onSelect should use apply() with input reference

Reported by: Stormtrooper Owned by: kbwood
Priority: minor Milestone: 1.2.2
Component: ui Version: 1.2.1
Keywords: datepicker onselect Cc:
Blocking: Blocked by:

Description

The onSelect callback of the Datepicker UI control should be bound to the input that triggered it and also pass the date variable to it as it does already.

for example (pseudo code):

somewhere within the datepicker code ... if (options.onSelect) {

options.onSelect.apply(the_input, [ date_var ]);

}

This way, the callback can reference 'this' as the input and can do more things depending on the input that triggered the calendar popup (useful when several date inputs are on a page). Adding this feature would not break previous versions since the date variable is still passed as the first argument to the callback.

Thanks.

Change History

comment:1 Changed 5 years ago by paul

  • Owner changed from paul to iMarc

comment:2 Changed 5 years ago by kbwood

  • Owner changed from iMarc to kbwood
  • Status changed from new to assigned

comment:3 Changed 5 years ago by kbwood

  • Status changed from assigned to closed
  • Resolution set to fixed

Implemented for all callbacks.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.