[ 35 posts ] Go to page 1, 2, 3, 4 Next

Chuck Irvine

  • Username: crirvine
  • Joined: Tue Feb 14, 2012 7:40 am
  • Posts: 4
  • Offline
  • Profile

Why no garden variety date picker

Post Posted: Tue Feb 14, 2012 7:56 am
+0-
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!

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: Why no garden variety date picker

Post Posted: Tue Feb 14, 2012 7:58 am
+0-
Check out the user supplied modules in the Gallery:

http://yuilibrary.com/gallery/

Chuck Irvine

  • Username: crirvine
  • Joined: Tue Feb 14, 2012 7:40 am
  • Posts: 4
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Tue Feb 14, 2012 8:33 am
+0-
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?

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Tue Feb 14, 2012 8:51 am
+0-
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.

Mattias Thorslund

  • Username: Mattias
  • Joined: Wed Mar 02, 2011 6:03 pm
  • Posts: 9
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Fri Feb 17, 2012 1:42 pm
+0-
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.

Simon Gilligan

  • Username: sgilligan
  • Joined: Wed Jun 16, 2010 4:35 pm
  • Posts: 76
  • Location: Victoria, Australia
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Sun Feb 19, 2012 3:35 am
+0-
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.

Daniel Kipp

  • Username: dck
  • Joined: Wed Aug 18, 2010 11:40 pm
  • Posts: 12
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Tue Mar 20, 2012 10:10 pm
+0-
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

Simon Gilligan

  • Username: sgilligan
  • Joined: Wed Jun 16, 2010 4:35 pm
  • Posts: 76
  • Location: Victoria, Australia
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Wed Mar 21, 2012 12:10 am
+0-
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!

Aaron Parmelee

  • Username: aparmelee
  • Joined: Thu Jul 07, 2011 1:31 pm
  • Posts: 13
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Tue Mar 27, 2012 8:57 am
+0-
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.

Mattias Thorslund

  • Username: Mattias
  • Joined: Wed Mar 02, 2011 6:03 pm
  • Posts: 9
  • Offline
  • Profile

Re: Why no garden variety date picker

Post Posted: Tue Mar 27, 2012 9:22 am
+0-
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.
  [ 35 posts ] Go to page 1, 2, 3, 4 Next
Display posts from previous:  Sort by  
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