| Page 1 of 4 | [ 35 posts ] | Go to page 1, 2, 3, 4 Next |
|
Hello, all. I'm new to YUI. Have just been looking at it for the past couple of days. Liking it, but there seems to be a lot to learn.
Right now I'm building a page that needs a date picker. Ideally, it would be a text field with a calendar icon next to it. Press on the icon and a calendar pops up. Pick a date. The calendar goes away and the date is inserted into the text field. Slightly less desirable - the user would click in the text field to get the calendar to pop up. I kind of expected this to be an existing YUI component, but it doesn't seem to be, and I'll need to created it my self. Before I do that, thought I'd make a quick post in the forum to make sure that I'm not overlooking something. Please let me know if I am. Thanks! |
|
|
|
Thanks, Dav. I did take a look there initially but couldn't find what I was looking for. I just checked again; still with no luck. I did see "AlloyUI Calendar Datepicker Select" but my requirement is that the date should input into a text field. Being so new to this, I'm probably missing something. Am I?
|
|
Actually I thought there was one in there, but it looks like there isn't.
You could use this example: http://yuilibrary.com/yui/docs/calendar ... imple.html Just change this line: Code: Y.one("#selecteddate").setContent(dtdate.format(newDate)); In the example `#selecteddate` is just an HTML element. You could easily make that an input element. |
|
I spent some time extending the Calendar, adding the input field association and mixing in Y.WidgetPosition, Y.WidgetPositionAlign, and Y.WidgetStack.
Required a bit more work than I had hoped. Looking forward to the Calendar plugin for this. |
|
Same here - had to mess around placing the calender in an overlay and mange the picker popup myself. I understand Chuck's post - that's just way too much fussing around for someone new to YUI. So yes, with 3.5.0 and a date picker plugin planned, this is sorely needed.
|
|
Looks like we have to wait a bit longer than 3.5. Until know i cant see a date picker plugin on https://github.com/yui/yui3
Please correct me if i'm wrong |
|
http://yuilibrary.com/projects/yui3/ticket/2530204
Bumped to 3.6 it looks like. I honestly don't understand why - this is a fundamental use-case for a calendar - make it available via date picker! |
|
I might be wrong, but having a calendar show() on the click event of a text box and then hide() on the calendar's selectionChange event is trivial. To the point of why even bother extending.
|
|
Aaron, give that a try and tell me what you think after that! Oh, and make it re-usable so you can use it in multiple forms with multiple date fields.
|
| Page 1 of 4 | [ 35 posts ] | Go to page 1, 2, 3, 4 Next |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group