Search and Top Navigation
#3091 closed enhancement (wontfix)
Opened July 11, 2008 04:48AM UTC
Closed July 23, 2008 12:51PM UTC
Allow association with textbox for inline calendar
Reported by: | bbelvin@caci.com | 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.
Attachments (0)
Change History (1)
Changed July 23, 2008 12:51PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
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
}
}