<commit_before>---
name: Titanium.UI.Picker
summary: |
    A control used to select one or more fixed values.
description: |
    Use the <Titanium.UI.createPicker> method to create a picker control.
    
    On Android, the `useSpinner` property must be enabled to support multiple columns.
    
    Adding views to picker rows is only supported on iOS.
extends: Titanium.Proxy
since: "0.8"
platforms: [android, iphone, ipad, mobileweb]
methods:
  - name: add
    summary: Adds rows or columns to the picker.
    parameters:
      - name: data
        summary: |
            A row, set of rows, a column of rows or a set of columns of rows. When this method is 
            used to add a row or set of rows, a single-column picker is created.
        type: [Array<Titanium.UI.PickerRow>, Titanium.UI.PickerRow, Array<Titanium.UI.PickerColumn>, Titanium.UI.PickerColumn]
    platforms: [iphone, ipad]

  - name: getSelectedRow
    summary: Gets the selected row for a column, or `null` if none exists.
    parameters:
      - name: index
        summary: A column index.
        type: Number
    returns: 
      - type: Titanium.UI.PickerRow
    
  - name: reloadColumn
    summary: Repopulates values for a column.
    parameters:
      - name: column
        summary: Column to repopulate.
        type: Titanium.UI.PickerColumn
    platforms: [iphone, ipad]
    
  - name: setSelectedRow
    summary: Selects a column's row.
    description: On iOS, this method must be called after the picker is rendered.
    parameters:
      - name: column
        summary: A column index.
        type: Number
        
      - name: row
        summary: A row index.
        type: Number
        
      - name: animated
        summary: |
            Determines whether the selection should be animated. (iPhone, iPad-only)
        type: Boolean
        default: true
        optional: true

  - name: setValue
    summary: Sets the date and time value property for Date pickers.
    description: |
        Applicable to the <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
    platforms: [iphone, ipad]
    parameters:
      - name: date
        summary: A Javascript `Date` object.
        type: Object
        
      - name: suppressEvent
        summary: Determines whether a `change` event is fired.
        type: Boolean
        default: true

    returns: 
      - type: Titanium.UI.PickerRow
    
  - name: showDatePickerDialog
    summary: Shows Date picker as a modal dialog.
    description: |
        Applicable to the <Titanium.UI.PICKER_TYPE_DATE> picker type.
        
        See "Date Picker using showDatePickerDialog()" for an example.
    parameters:
      - name: dictObj
        summary: |
            Dictionary object with a subset of `Titanium.UI.Picker` properties 
            and a callback defined. Acceptable object properties are 
            `callback`, `okButtonTitle`, `title` and `value`.
        type: Object
    platforms: [android]

  - name: showTimePickerDialog
    summary: Shows Time picker as a modal dialog.
    description: |
        Applicable to the <Titanium.UI.PICKER_TYPE_TIME> picker type.  
        
        See "Date Picker using showDatePickerDialog()" for a similar example.
    parameters:
      - name: dictObj
        summary: |
            Dictionary object with a subset of `Titanium.UI.Picker` properties 
            and a callback defined. Acceptable object properties are 
            `callback`, `format24`, `okButtonTitle`, `title` and `value`.
        type: Object
    platforms: [android]

events:
  - name: change
    summary: Fired when the value of any column's row is changed.
    properties:
      - name: columnIndex
        summary: |
            Selected column index. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> 
            picker types.
        type: Number
        
      - name: rowIndex
        summary: |
            Selected row index. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> 
            picker types.
        type: Number
        
      - name: column
        summary: |
            The column object. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> 
            picker types.
        type: Titanium.UI.PickerColumn
        
      - name: countDownDuration
        summary: |
            The selected duration. Applicable to <Ti.UI.PICKER_TYPE_COUNT_DOWN_TIMER> picker types.
        type: Number

      - name: value
        summary: |
            The selected value. Applicable to date/time pickers only. This property is read-only 
            on Android.
        type: String
        
      - name: row
        summary: |
            The row object. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> picker types.
        type: Titanium.UI.PickerRow
        
      - name: selectedValue
        summary: |
            Array of selected values, one element per column in the picker. Applicable to 
            <Titanium.UI.PICKER_TYPE_PLAIN> picker types.
        type: Array<String>
properties:
  - name: columns
    summary: Columns used for this picker, as an array of <Titanium.UI.PickerColumn> objects.
    type: Array<Titanium.UI.PickerColumn>
    
  - name: countDownDuration
    summary: Duration in milliseconds used for a Countdown Timer picker.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_COUNT_DOWN_TIMER> picker types.
    type: Number
    platforms: [iphone, ipad]
    
  - name: format24
    summary: |
        Determines whether the Time pickers display in 24-hour or 12-hour clock format.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_TIME> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        When this property is enabled, a time picker is displayed with hours 0 through 23, 
        or with hours 1 through 12 and am/pm controls otherwise.
        
        For backward compatibility, the default value of this property depends on the style of 
        picker in use.  
        
        For a spinner picker (when `useSpinner` is `true`), this defaults to `true` (24-hour format.)  
        For a native picker (when `useSpinner` is either un-set or `false`), this defaults to `false` 
        (12-hour format.)
        
        The value of this property may be modified even after a picker is rendered and the UI will be 
        updated accordingly.
    type: Boolean
    default: true (spinner enabled), false (otherwise)
    platforms: [android]
    
  - name: locale
    summary: Locale used when displaying Date and Time picker values.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE>, <Titanium.UI.PICKER_TYPE_TIME> and 
        <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> picker types.
        
        Locale must be represented as a combination of ISO 2-letter language and country codes. 
        For example, `en-US` or `en-GB`. See the 
        [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and 
        [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) 
        sections of wikipedia for reference.
        
        On iOS, the system locale is always used.
    type: String
    default: System Settings
    platforms: [android]

  - name: maxDate
    summary: Maximum date displayed when a Date picker is in use.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        This property is ignored when `maxDate` is less than `minDate`.
    type: Date

  - name: minDate
    summary: Minimum date displayed when a Date picker is in use.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        This property is ignored when `maxDate` is less than `minDate`.
    type: Date
    
  - name: minuteInterval
    summary: |
        Interval in minutes displayed when one of the Time types of pickers is in use.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_TIME> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        The minimum permitted value is 1 and maximum is 30. If the value cannot be evenly divided 
        into 60, the default value is used. 
    type: Number
    default: 1
    platforms: [iphone, ipad]
    
  - name: selectionIndicator
    summary: |
        Determines whether the visual selection indicator is shown. On iPhone, this is a blue bar.
    description: If `true`, selection indicator is enabled.
    type: Boolean
    default: true (Android), false (iPhone, iPad),
    platforms: [android, iphone, ipad]
    
  - name: type
    summary: Determines the type of picker displayed
    description: |
        One of <Titanium.UI.PICKER_TYPE_PLAIN>, 
        <Titanium.UI.PICKER_TYPE_DATE>, <Titanium.UI.PICKER_TYPE_TIME>, 
        <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> (Mobile Web, iPhone, iPad-only) 
        and <Titanium.UI.PICKER_TYPE_COUNT_DOWN_TIMER> (iPhone, iPad-only.). 
        
        Mobile Web relies on input types for date and time types, but as of Q1 2012 these input types 
        are not supported on most browsers, those that do support it support it poorly, and no fall-back 
        exists. It is recommended not to use these types on Mobile Web until browser support improves.
    type: Number
    default: <Titanium.UI.PICKER_TYPE_PLAIN>
    
  - name: useSpinner
    summary: |
        Determines whether the non-native Android control, with a spinning wheel that looks and 
        behaves like the iOS picker, is invoked rather than the default native "dropdown" style.
    description: |
        If `true`, the spinner is enabled.
        
        This property should be set either at picker creation, i.e. 
        `Titanium.UI.createPicker({ useSpinner:true });`, or before the picker is added to its parent.  
        
        This property must be enabled for multi-column pickers.
    type: Boolean
    default: false
    platforms: [android]
    
  - name: value
    summary: Date and time value for Date pickers.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
    type: Date
    
  - name: visibleItems
    summary: |
        Number of visible rows to display. This is only applicable to a plain picker and when the 
        `useSpinner` is `true`.
    description: |
        The spinner-style Android picker shows 5 rows by default; one selected in the middle and 2 
        above and below. Set to an odd number to ensure the selected row is in the middle.
        
    type: Number
    default: 5
    platforms: [android]
examples:
  - title: Basic Single Column Picker
    example: |
        Create a one-column, platform-specific style, picker and automatically select a row.
        
            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              top:50
            });
            
            var data = [];
            data[0]=Ti.UI.createPickerRow({title:'Bananas'});
            data[1]=Ti.UI.createPickerRow({title:'Strawberries'});
            data[2]=Ti.UI.createPickerRow({title:'Mangos'});
            data[3]=Ti.UI.createPickerRow({title:'Grapes'});
            
            picker.add(data);
            picker.selectionIndicator = true;
            
            win.add(picker);
            win.open();
            
            // must be after picker has been displayed
            picker.setSelectedRow(0, 2, false); // select Mangos
            
  - title: Multi-Column Picker
    example: |
        Create a two-column, platform-specific style, picker and automatically select a row in 
        each column.

            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              top:50
            });
            picker.selectionIndicator = true;

            var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ];
            var color = [ 'red', 'green', 'blue', 'orange' ];

            var column1 = Ti.UI.createPickerColumn();

            for(var i=0, ilen=fruit.length; i<ilen; i++){
              var row = Ti.UI.createPickerRow({
                title: fruit[i]
              });
              column1.addRow(row);
            }

            var column2 = Ti.UI.createPickerColumn();

            for(var i=0, ilen=color.length; i<ilen; i++){
              var row = Ti.UI.createPickerRow({ title: color[i] });
              column2.addRow(row);
            }

            picker.add([column1,column2]);

            win.add(picker);

            win.open();
            
            // must be after picker has been displayed
            picker.setSelectedRow(0, 2, false); // select Mangos
            picker.setSelectedRow(1, 3, false); // select Orange
            
  - title: Date Picker
    example: |
        Create a date picker and handle the subsequent user action.

            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              type:Ti.UI.PICKER_TYPE_DATE,
              minDate:new Date(2009,0,1),
              maxDate:new Date(2014,11,31),
              value:new Date(2014,3,12),
              top:50
            });

            win.add(picker);
            win.open();

            picker.addEventListener('change',function(e){
              Ti.API.info("User selected date: " + e.value.toLocaleString());
            });
            
  - title: Date Picker using showDatePickerDialog() (Android only)
    example: |
        Create a date picker that is automatically displayed as a modal dialog and handle the 
        subsequent user action.

            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              type:Ti.UI.PICKER_TYPE_DATE,
              minDate:new Date(2009,0,1),
              maxDate:new Date(2014,11,31),
              value:new Date(2014,3,12)
            });

            win.open();

            picker.showDatePickerDialog({
              value: new Date(2010,8,1),
              callback: function(e) {
                if (e.cancel) {
                  Ti.API.info('User canceled dialog');
                } else {
                  Ti.API.info('User selected date: ' + e.value);
                }
              }
            });
            

<commit_msg>[TIMOB-1462] Update doc. Specify countDownDuration is in ms<commit_after>---
name: Titanium.UI.Picker
summary: |
    A control used to select one or more fixed values.
description: |
    Use the <Titanium.UI.createPicker> method to create a picker control.
    
    On Android, the `useSpinner` property must be enabled to support multiple columns.
    
    Adding views to picker rows is only supported on iOS.
extends: Titanium.Proxy
since: "0.8"
platforms: [android, iphone, ipad, mobileweb]
methods:
  - name: add
    summary: Adds rows or columns to the picker.
    parameters:
      - name: data
        summary: |
            A row, set of rows, a column of rows or a set of columns of rows. When this method is 
            used to add a row or set of rows, a single-column picker is created.
        type: [Array<Titanium.UI.PickerRow>, Titanium.UI.PickerRow, Array<Titanium.UI.PickerColumn>, Titanium.UI.PickerColumn]
    platforms: [iphone, ipad]

  - name: getSelectedRow
    summary: Gets the selected row for a column, or `null` if none exists.
    parameters:
      - name: index
        summary: A column index.
        type: Number
    returns: 
      - type: Titanium.UI.PickerRow
    
  - name: reloadColumn
    summary: Repopulates values for a column.
    parameters:
      - name: column
        summary: Column to repopulate.
        type: Titanium.UI.PickerColumn
    platforms: [iphone, ipad]
    
  - name: setSelectedRow
    summary: Selects a column's row.
    description: On iOS, this method must be called after the picker is rendered.
    parameters:
      - name: column
        summary: A column index.
        type: Number
        
      - name: row
        summary: A row index.
        type: Number
        
      - name: animated
        summary: |
            Determines whether the selection should be animated. (iPhone, iPad-only)
        type: Boolean
        default: true
        optional: true

  - name: setValue
    summary: Sets the date and time value property for Date pickers.
    description: |
        Applicable to the <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
    platforms: [iphone, ipad]
    parameters:
      - name: date
        summary: A Javascript `Date` object.
        type: Object
        
      - name: suppressEvent
        summary: Determines whether a `change` event is fired.
        type: Boolean
        default: true

    returns: 
      - type: Titanium.UI.PickerRow
    
  - name: showDatePickerDialog
    summary: Shows Date picker as a modal dialog.
    description: |
        Applicable to the <Titanium.UI.PICKER_TYPE_DATE> picker type.
        
        See "Date Picker using showDatePickerDialog()" for an example.
    parameters:
      - name: dictObj
        summary: |
            Dictionary object with a subset of `Titanium.UI.Picker` properties 
            and a callback defined. Acceptable object properties are 
            `callback`, `okButtonTitle`, `title` and `value`.
        type: Object
    platforms: [android]

  - name: showTimePickerDialog
    summary: Shows Time picker as a modal dialog.
    description: |
        Applicable to the <Titanium.UI.PICKER_TYPE_TIME> picker type.  
        
        See "Date Picker using showDatePickerDialog()" for a similar example.
    parameters:
      - name: dictObj
        summary: |
            Dictionary object with a subset of `Titanium.UI.Picker` properties 
            and a callback defined. Acceptable object properties are 
            `callback`, `format24`, `okButtonTitle`, `title` and `value`.
        type: Object
    platforms: [android]

events:
  - name: change
    summary: Fired when the value of any column's row is changed.
    properties:
      - name: columnIndex
        summary: |
            Selected column index. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> 
            picker types.
        type: Number
        
      - name: rowIndex
        summary: |
            Selected row index. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> 
            picker types.
        type: Number
        
      - name: column
        summary: |
            The column object. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> 
            picker types.
        type: Titanium.UI.PickerColumn
        
      - name: countDownDuration
        summary: |
            The selected duration in milliseconds. Applicable to <Ti.UI.PICKER_TYPE_COUNT_DOWN_TIMER> picker types.
        type: Number

      - name: value
        summary: |
            The selected value. Applicable to date/time pickers only. This property is read-only 
            on Android.
        type: String
        
      - name: row
        summary: |
            The row object. On iOS and Mobile Web, only applicable to <Titanium.UI.PICKER_TYPE_PLAIN> picker types.
        type: Titanium.UI.PickerRow
        
      - name: selectedValue
        summary: |
            Array of selected values, one element per column in the picker. Applicable to 
            <Titanium.UI.PICKER_TYPE_PLAIN> picker types.
        type: Array<String>
properties:
  - name: columns
    summary: Columns used for this picker, as an array of <Titanium.UI.PickerColumn> objects.
    type: Array<Titanium.UI.PickerColumn>
    
  - name: countDownDuration
    summary: Duration in milliseconds used for a Countdown Timer picker.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_COUNT_DOWN_TIMER> picker types.
    type: Number
    platforms: [iphone, ipad]
    
  - name: format24
    summary: |
        Determines whether the Time pickers display in 24-hour or 12-hour clock format.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_TIME> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        When this property is enabled, a time picker is displayed with hours 0 through 23, 
        or with hours 1 through 12 and am/pm controls otherwise.
        
        For backward compatibility, the default value of this property depends on the style of 
        picker in use.  
        
        For a spinner picker (when `useSpinner` is `true`), this defaults to `true` (24-hour format.)  
        For a native picker (when `useSpinner` is either un-set or `false`), this defaults to `false` 
        (12-hour format.)
        
        The value of this property may be modified even after a picker is rendered and the UI will be 
        updated accordingly.
    type: Boolean
    default: true (spinner enabled), false (otherwise)
    platforms: [android]
    
  - name: locale
    summary: Locale used when displaying Date and Time picker values.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE>, <Titanium.UI.PICKER_TYPE_TIME> and 
        <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> picker types.
        
        Locale must be represented as a combination of ISO 2-letter language and country codes. 
        For example, `en-US` or `en-GB`. See the 
        [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and 
        [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) 
        sections of wikipedia for reference.
        
        On iOS, the system locale is always used.
    type: String
    default: System Settings
    platforms: [android]

  - name: maxDate
    summary: Maximum date displayed when a Date picker is in use.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        This property is ignored when `maxDate` is less than `minDate`.
    type: Date

  - name: minDate
    summary: Minimum date displayed when a Date picker is in use.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        This property is ignored when `maxDate` is less than `minDate`.
    type: Date
    
  - name: minuteInterval
    summary: |
        Interval in minutes displayed when one of the Time types of pickers is in use.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_TIME> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
        
        The minimum permitted value is 1 and maximum is 30. If the value cannot be evenly divided 
        into 60, the default value is used. 
    type: Number
    default: 1
    platforms: [iphone, ipad]
    
  - name: selectionIndicator
    summary: |
        Determines whether the visual selection indicator is shown. On iPhone, this is a blue bar.
    description: If `true`, selection indicator is enabled.
    type: Boolean
    default: true (Android), false (iPhone, iPad),
    platforms: [android, iphone, ipad]
    
  - name: type
    summary: Determines the type of picker displayed
    description: |
        One of <Titanium.UI.PICKER_TYPE_PLAIN>, 
        <Titanium.UI.PICKER_TYPE_DATE>, <Titanium.UI.PICKER_TYPE_TIME>, 
        <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> (Mobile Web, iPhone, iPad-only) 
        and <Titanium.UI.PICKER_TYPE_COUNT_DOWN_TIMER> (iPhone, iPad-only.). 
        
        Mobile Web relies on input types for date and time types, but as of Q1 2012 these input types 
        are not supported on most browsers, those that do support it support it poorly, and no fall-back 
        exists. It is recommended not to use these types on Mobile Web until browser support improves.
    type: Number
    default: <Titanium.UI.PICKER_TYPE_PLAIN>
    
  - name: useSpinner
    summary: |
        Determines whether the non-native Android control, with a spinning wheel that looks and 
        behaves like the iOS picker, is invoked rather than the default native "dropdown" style.
    description: |
        If `true`, the spinner is enabled.
        
        This property should be set either at picker creation, i.e. 
        `Titanium.UI.createPicker({ useSpinner:true });`, or before the picker is added to its parent.  
        
        This property must be enabled for multi-column pickers.
    type: Boolean
    default: false
    platforms: [android]
    
  - name: value
    summary: Date and time value for Date pickers.
    description: |
        Applicable to <Titanium.UI.PICKER_TYPE_DATE> and <Titanium.UI.PICKER_TYPE_DATE_AND_TIME> 
        picker types.
    type: Date
    
  - name: visibleItems
    summary: |
        Number of visible rows to display. This is only applicable to a plain picker and when the 
        `useSpinner` is `true`.
    description: |
        The spinner-style Android picker shows 5 rows by default; one selected in the middle and 2 
        above and below. Set to an odd number to ensure the selected row is in the middle.
        
    type: Number
    default: 5
    platforms: [android]
examples:
  - title: Basic Single Column Picker
    example: |
        Create a one-column, platform-specific style, picker and automatically select a row.
        
            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              top:50
            });
            
            var data = [];
            data[0]=Ti.UI.createPickerRow({title:'Bananas'});
            data[1]=Ti.UI.createPickerRow({title:'Strawberries'});
            data[2]=Ti.UI.createPickerRow({title:'Mangos'});
            data[3]=Ti.UI.createPickerRow({title:'Grapes'});
            
            picker.add(data);
            picker.selectionIndicator = true;
            
            win.add(picker);
            win.open();
            
            // must be after picker has been displayed
            picker.setSelectedRow(0, 2, false); // select Mangos
            
  - title: Multi-Column Picker
    example: |
        Create a two-column, platform-specific style, picker and automatically select a row in 
        each column.

            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              top:50
            });
            picker.selectionIndicator = true;

            var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ];
            var color = [ 'red', 'green', 'blue', 'orange' ];

            var column1 = Ti.UI.createPickerColumn();

            for(var i=0, ilen=fruit.length; i<ilen; i++){
              var row = Ti.UI.createPickerRow({
                title: fruit[i]
              });
              column1.addRow(row);
            }

            var column2 = Ti.UI.createPickerColumn();

            for(var i=0, ilen=color.length; i<ilen; i++){
              var row = Ti.UI.createPickerRow({ title: color[i] });
              column2.addRow(row);
            }

            picker.add([column1,column2]);

            win.add(picker);

            win.open();
            
            // must be after picker has been displayed
            picker.setSelectedRow(0, 2, false); // select Mangos
            picker.setSelectedRow(1, 3, false); // select Orange
            
  - title: Date Picker
    example: |
        Create a date picker and handle the subsequent user action.

            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              type:Ti.UI.PICKER_TYPE_DATE,
              minDate:new Date(2009,0,1),
              maxDate:new Date(2014,11,31),
              value:new Date(2014,3,12),
              top:50
            });

            win.add(picker);
            win.open();

            picker.addEventListener('change',function(e){
              Ti.API.info("User selected date: " + e.value.toLocaleString());
            });
            
  - title: Date Picker using showDatePickerDialog() (Android only)
    example: |
        Create a date picker that is automatically displayed as a modal dialog and handle the 
        subsequent user action.

            Ti.UI.backgroundColor = 'white';
            var win = Ti.UI.createWindow({
              exitOnClose: true,
              layout: 'vertical'
            });

            var picker = Ti.UI.createPicker({
              type:Ti.UI.PICKER_TYPE_DATE,
              minDate:new Date(2009,0,1),
              maxDate:new Date(2014,11,31),
              value:new Date(2014,3,12)
            });

            win.open();

            picker.showDatePickerDialog({
              value: new Date(2010,8,1),
              callback: function(e) {
                if (e.cancel) {
                  Ti.API.info('User canceled dialog');
                } else {
                  Ti.API.info('User selected date: ' + e.value);
                }
              }
            });
            


{'fraction_non_alphanumeric': 0.0809643995749203, 'fraction_numerical': 0.008568012752391073, 'mean_word_length': 1.9714821393329387, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2202846', 'n_tokens_mistral': 8764, 'n_tokens_neox': 8343, 'n_words': 2811}