YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  • Home
  • Gallery
  • Forums
  • YUI 2
  • YUI 3
  • YUI Labs
  • YUI Compressor
  • More
  • Gallery Forums
  • Gallery Stats
  • Gallery Calendar
  • Register
  • Login

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

ericf lsmith davglass nzakas event ajax overlay port jacobfogg slideshow yui2 skinnable widget form jsonp adam apipkin animation tivac io rgrove node caridy plugin foxxtrot jafl

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Timepicker (gallery-timepicker) on cdn

    Last Updated: 10/30/09
    + 3 -

    Stephen Woods

    YUI Contributor

    Featured Item

    Created: 10/23/09
    Last CDN Push: 02/25/10
    Build Tag: gallery-2010.02.25-22
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.0.0
    Free for use.
    Module Image

    Creates a very cool little timepicker:

    http://img.skitch.com/20091023-msrt5fbjyfdc5825shwp4ytp8t.png

    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Attach a timepicker widget to a text input.

    Code Sample

    <script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2010.02.25-22'
    }).use('gallery-timepicker', function(Y) {
     
     var picker = new Y.Saw.Timepicker({contentBox: '#cb'}); //assuming this exists
                    picker.render();
     
                    //hide
                    picker.hide();
     
                    //show
                    picker.show();
     
                    //set am or pm with class constants
                    picker.set('time.ampm', picker.AM);
     
                    //subscribe to events to do cool stuff:
                    picker.subscribe('timeset', function(data){
                        //fires when the time changes
     
                        //put the 12 hour string into the input. s24hour is also available
                        Y.get('#time').set('value' ,data.s12hour); //#time should be a text input
     
                        //the data object also has members for hour, minute, ampm. Ampm is
                        //an int identified by picker.AM or picker.PM
                    });
     
                    picker.subscribe('cellclick', function(e){
                        //fires when a cell is clicked.
                       this.hide(); 
                    },picker);
    });

    Forum Posts

    Subject Author Date
    Feature Requests Stephen Woods 10/31/09
    Re: Feature Requests Viktor Rennert 11/2/09
    Re: Feature Requests Stephen Woods 11/2/09
    Re: Feature Requests johng 02/20/10
    Re: Feature Requests Joss DaBoss 02/20/10
    Re: Feature Requests Stephen Woods 02/23/10
    Re: Feature Requests Stephen Woods 02/23/10
    Re: Feature Requests Stephen Woods 02/23/10
    Re: Feature Requests Stephen Woods 02/26/10
    Timepicker blog post Eric Miraglia 03/3/10
    YUI Projects
    • All YUI Downloads
    • YUI 2
    • YUI 3
    • YUI Doc
    • YUI Compressor
    • YUILibrary.com
    • YUI Build Tool
    • YUI PHP Loader
    YUI Labs
    • All YUI Labs Projects
    • Yeti
    Pages & Links
    • All YUI Downloads
    • Git FAQ
    • Graded Browser Support
    • Contribute to YUI
    • Forum Stats
    • Gallery Stats
    • YUI Calendar
    Contribute
    • Submit a Bug
    • Request a Feature
    • Write Code
    • Meet the Team
    Follow YUI
    • on GitHub
    • on Twitter
    • on FriendFeed
    • on Facebook
    • on IRC
    • YUI Blog
    • YUI Theater
    • YUI Forums

    © 2010 YUI Library - Site Credits