Ticket #4964 (closed bug: invalid)

Opened 10 months ago

Last modified 9 months ago

Custom trigger for DatePicker again

Reported by: ivanhalen Owned by:
Priority: minor Milestone: TBD
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:

Description

Hallo, Regarding Ticket 4516, seems the provided solution doesn't work (Firefox Error Console keeps saying "inst is undefined" in  http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js)

Here's the HTML code:

<input name="ART_DATED" id="ART_DATED" type="text" class="date" value="<%= Date() %>" size="10" maxlength="10" /> <a href="javascript:void(0);" class="dateButton">Click here</a>

Pleas, where am I wrong? Thanks

Change History

Changed 10 months ago by ivanhalen

Sorry, my (partial) fault; I did not initialised the Date Picker, so the working code is this:

$('#ART_DATED').datepicker(); $('.dateButton').click(function() {

$('#ART_DATED').datepicker('show');

});

Anyway, clicking on the input field still opens the Date Picker, and that's just what I'm trying to avoid (the user should be FORCED to click on the link to open the Date Picker, otherwise he can simply type a date in the input field)

The "Icon trigger" demo example works right ( http://jqueryui.com/demos/datepicker/#icon-trigger): it opens the Date Picker only when clicking on image, NOT on the input field... How can I reach this with a simple link instead of a button/image?

Thanks

Changed 9 months ago by scott.gonzalez

  • status changed from new to closed
  • resolution set to invalid

Please ask for help on the  mailing list not the bug tracker.

Note: See TracTickets for help on using tickets.