Opened 15 years ago

Closed 15 years ago

#3091 closed enhancement (wontfix)

Allow association with textbox for inline calendar

Reported by: [email protected] Owned by: grabanski
Priority: minor Milestone:
Component: ui.datepicker Version: 1.5.1
Keywords: inline textbox Cc:
Blocked by: Blocking:

Description

Right now an inline calendar appears to want to only operate independently. If it is possible to associate a textbox with an inline calendar, I have been unable to find it after combing through the 1500 lines of code.

I request that the code be updated to allow an inline calendar to be associated with a textbox so users can choose to either click a date or type one in. Ideally, the change event on the textbox would cause the calendar to update and, if minDate or maxDate are set, check the validity of the inputted date/range.

I will continue investigating this issue as I am up against a deadline and I will post code if I am able to develop a solution, but it would be nice to have an "official" code solution.

Thank you.

Change History (1)

comment:1 Changed 15 years ago by kbwood

Resolution: wontfix
Status: newclosed

You can do this with the latest version (1.5.2) via the altField setting, which allows you to automatically push a date selection into another field. See the example below:

<input type="text" id="altInline" size="10"/> <div id="inline"></div>

$("#inline").datepicker({altField: "#altInline", altFormat: "mm/dd/yy"}); $("#altInline").keyup(setInlineDate);

function setInlineDate() {

try {

var date = $.datepicker.parseDate("mm/dd/yy", $("#altInline").val()); $("#inline").datepicker("setDate", date);

} catch (e) {

Ignore

}

}

Note: See TracTickets for help on using tickets.