1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    Sofia
    Posts
    213
    Vote Rating
    9
    mx_starter will become famous soon enough

      1  

    Default Ext.ux.button.DateRangePicker

    Yet another simple extension for picking a range of dates/times in ExtJS apps.
    I wanted to make it as compact and simple possible, so decided to wrap all the UI within a button menu.

    Sencha fiddle: https://fiddle.sencha.com/#fiddle/10t2
    JS Fiddle: http://jsfiddle.net/mx_starter/xLvg5yj6/
    GitHub: https://github.com/wencywww/Ext.ux.b...ateRangePicker


    Untitled.png

    Here is the demo fiddle (the Get Picker Data button is not part of the picker, clicking it will log the picker return object in the console):



    In short, it can be configured with start/end dates (and optionally - times), has several preset periods for fast choosing, supports custom formats for the dates/times and can be customized with your own captures/icons.

    The configuration is done via single config object (see github/jsfiddle links for details of the configs)

    The picker returns its data via the getValue() method which returns an object with the period details, something like this:
    Capture.PNG


    Example usage:

    Code:
    var myPicker = Ext.create('Ext.ux.button.DateRangePicker'); //create it with a default configurations
    or, if you wish to add it to your own container:
    Code:
    {xtype: 'daterangepicker', drpDefaults: { //optional custom configurations here }}
    To get the picker data, use:
    Code:
    var pickerData = myPicker.getValue()
    and inspect the returned object

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    8,778
    Vote Rating
    240
    Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of

      0  

    Default

    Nice work. Thanks for sharing with the community!


    Join me at SenchaCon 2016!

  3. #3
    Sencha User
    Join Date
    Jul 2014
    Posts
    249
    Vote Rating
    7
    josei is on a distinguished road

      0  

    Default

    Thanks mx_starter.

    Very good and very useful.
    A great help for building ExtJS applications.

    Thanks for your message.

Similar Threads

  1. Replies: 1
    Last Post: 16 Aug 2015, 2:43 PM
  2. [FIXED] What happened to to the Ext.button.Button button, e, eOpts args for controller
    By denisputnam in forum Sencha Architect 3.x: Bugs
    Replies: 3
    Last Post: 21 Jan 2015, 7:45 AM
  3. What happened to to the Ext.button.Button button, e, eOpts args for controller
    By denisputnam in forum Sencha Architect 3.x: Q&A
    Replies: 2
    Last Post: 19 Jan 2015, 10:30 AM
  4. Button UI: Combine x-button-small with x-button-back and x-button-action
    By Benjamin Ansbach in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 21 Feb 2013, 2:05 PM
  5. [3.x] Ext.ux.DateRangePicker Extension
    By McCornic in forum Ext 3.x: User Extensions and Plugins
    Replies: 23
    Last Post: 14 Sep 2011, 12:25 AM

Thread Participants: 2

Tags for this Thread