<tdclass="cellrowborder"valign="top"width="35.76%"headers="mcps1.1.6.1.5 "><pid="p126974719915"><aname="p126974719915"></a><aname="p126974719915"></a>Type of the scrollable selector, which cannot be changed dynamically. Available values are as follows:</p>
<aname="ul16977711916"></a><aname="ul16977711916"></a><ulid="ul16977711916"><li><strongid="b184817616590"><aname="b184817616590"></a><aname="b184817616590"></a>text</strong>: text selector</li><li><strongid="b116831455916"><aname="b116831455916"></a><aname="b116831455916"></a>time</strong>: time selector</li><li><strongid="b42691554144215"><aname="b42691554144215"></a><aname="b42691554144215"></a>date</strong>: date selector</li><li><strongid="b540355819423"><aname="b540355819423"></a><aname="b540355819423"></a>datetime</strong>: date and time selector</li><li><strongid="b222813410439"><aname="b222813410439"></a><aname="b222813410439"></a>multi-text</strong>: multi-column text selector</li></ul>
<tdclass="cellrowborder"valign="top"width="49.4050594940506%"headers="mcps1.1.6.1.5 "><pid="p879110395507"><aname="p879110395507"></a><aname="p879110395507"></a>Value range of the text selector.</p>
<divclass="note"id="note195791919121"><aname="note195791919121"></a><aname="note195791919121"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p11957191913124"><aname="p11957191913124"></a><aname="p11957191913124"></a>Use the data binding mode, for example, range = {{data}}. Declare the corresponding variable <strongid="b1056351631112"><aname="b1056351631112"></a><aname="b1056351631112"></a>data: ["15", "20", "25"]</strong> in JavaScript.</p>
<tdclass="cellrowborder"valign="top"width="49.4050594940506%"headers="mcps1.1.6.1.5 "><pid="p649017329613"><aname="p649017329613"></a><aname="p649017329613"></a>Default value of the text selector. The value is the index of <strongid="b121361525737"><aname="b121361525737"></a><aname="b121361525737"></a>range</strong>.</p>
<tdclass="cellrowborder"valign="top"width="49.4050594940506%"headers="mcps1.1.6.1.5 "><pid="p114526534115"><aname="p114526534115"></a><aname="p114526534115"></a>Prefix field added when a value is specified for the text selector.</p>
<tdclass="cellrowborder"valign="top"width="49.4050594940506%"headers="mcps1.1.6.1.5 "><pid="p175201958121212"><aname="p175201958121212"></a><aname="p175201958121212"></a>Suffix field added when a value is specified for the text selector.</p>
<tdclass="cellrowborder"valign="top"width="49.41%"headers="mcps1.1.6.1.5 "><pid="p13773101919719"><aname="p13773101919719"></a><aname="p13773101919719"></a>Whether seconds are contained.</p>
<tdclass="cellrowborder"valign="top"width="49.41%"headers="mcps1.1.6.1.5 "><pid="p5241145091814"><aname="p5241145091814"></a><aname="p5241145091814"></a>Default value of the time selector, in the format of HH:mm.</p>
<pid="p57739191974"><aname="p57739191974"></a><aname="p57739191974"></a>If seconds are contained, the format is HH:mm:ss.</p>
<tdclass="cellrowborder"valign="top"width="49.41%"headers="mcps1.1.6.1.5 "><pid="p1095393116216"><aname="p1095393116216"></a><aname="p1095393116216"></a>Time format used by the time selector. Available values include:</p>
<aname="ul11382144442112"></a><aname="ul11382144442112"></a><ulid="ul11382144442112"><li><strongid="b793617752019"><aname="b793617752019"></a><aname="b793617752019"></a>12</strong>: displayed in 12-hour format and distinguished by a.m. and p.m.</li><li><strongid="b273115197214"><aname="b273115197214"></a><aname="b273115197214"></a>24</strong>: displayed in 24-hour format<divclass="note"id="note189471313104"><aname="note189471313104"></a><aname="note189471313104"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p9947193114104"><aname="p9947193114104"></a><aname="p9947193114104"></a>The default value is the most commonly-used hour format in the current locale. <supid="sup319942110314"><aname="sup319942110314"></a><aname="sup319942110314"></a>5+</sup></p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p87681568618"><aname="p87681568618"></a><aname="p87681568618"></a>Start date of the date selector, in the format of YYYY-MM-DD.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p1176915562611"><aname="p1176915562611"></a><aname="p1176915562611"></a>End date of the date selector, in the format of YYYY-MM-DD.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p17695564620"><aname="p17695564620"></a><aname="p17695564620"></a>Default value of the date selector, in the format of YYYY-MM-DD.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p14238195141316"><aname="p14238195141316"></a><aname="p14238195141316"></a>Whether the pop-up window displays the lunar calendar.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p781663212178"><aname="p781663212178"></a><aname="p781663212178"></a>Whether to display the lunar calendar switch in the date selector. When this switch is displayed, you can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar. </p>
<tdclass="cellrowborder"valign="top"width="8.63%"headers="mcps1.1.6.1.3 "><pid="p16887539111214"><aname="p16887539111214"></a><aname="p16887539111214"></a>Current date and time</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p33848571013"><aname="p33848571013"></a><aname="p33848571013"></a>Default value of the date and time selector. The value can be in the format of MM-DD-HH-mm or YYYY-MM-DD-HH-mm. If the year is not set, the current year is used by default. The value you set is the date selected by default in the pop-up window.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p1314251932418"><aname="p1314251932418"></a><aname="p1314251932418"></a>Time format used by the date and time selector. Available values include:</p>
<aname="ul15923173119204"></a><aname="ul15923173119204"></a><ulid="ul15923173119204"><li><strongid="b113902010491"><aname="b113902010491"></a><aname="b113902010491"></a>12</strong>: displayed in 12-hour format and distinguished by a.m. and p.m.</li><li><strongid="b930736675"><aname="b930736675"></a><aname="b930736675"></a>24</strong>: displayed in 24-hour format<divclass="note"id="note1880145011113"><aname="note1880145011113"></a><aname="note1880145011113"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p1988165031111"><aname="p1988165031111"></a><aname="p1988165031111"></a>The default value is the most commonly-used hour format in the current locale. <supid="sup11183114910314"><aname="sup11183114910314"></a><aname="sup11183114910314"></a>5+</sup></p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p16203181541812"><aname="p16203181541812"></a><aname="p16203181541812"></a>Whether the pop-up window displays the lunar calendar.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p12203111510184"><aname="p12203111510184"></a><aname="p12203111510184"></a>Whether to display the lunar calendar switch in the date and time selector. When this switch is displayed, you can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar. </p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p1675884931313"><aname="p1675884931313"></a><aname="p1675884931313"></a>Number of columns in the multi-column text selector.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p139301644675"><aname="p139301644675"></a><aname="p139301644675"></a>Items of the multi-column text selector. <strongid="b164211558164916"><aname="b164211558164916"></a><aname="b164211558164916"></a>range</strong> is a two-dimensional array that indicates the number of columns. Each item in the array indicates the data of each column, for example, <strongid="b1751216441149"><aname="b1751216441149"></a><aname="b1751216441149"></a>[["a","b"], ["c","d"]]</strong>.</p>
<divclass="note"id="note112201642121219"><aname="note112201642121219"></a><aname="note112201642121219"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p8220114221212"><aname="p8220114221212"></a><aname="p8220114221212"></a>Use the data binding mode, for example, range = {{data}}. Declare the corresponding variable <strongid="b4470649201410"><aname="b4470649201410"></a><aname="b4470649201410"></a>data: [["a","b"], ["c","d"]]</strong> in the JavaScript.</p>
<tdclass="cellrowborder"valign="top"width="49.410000000000004%"headers="mcps1.1.6.1.5 "><pid="p12930144373"><aname="p12930144373"></a><aname="p12930144373"></a>Default value of the multi-column text selector, which is an array consisting of the indexes of the selected items in each column.</p>
</td>
</tr>
</tbody>
</table>
## Styles<a name="section198061172344"></a>
In addition to the styles in [Universal Styles](js-components-common-styles.md), the following styles are supported.
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p84926239401"><aname="p84926239401"></a><aname="p84926239401"></a>Font color of a candidate item.</p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p19492112316406"><aname="p19492112316406"></a><aname="p19492112316406"></a>Font size of a candidate item. The value is of the length type, in pixels.</p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p20492152334010"><aname="p20492152334010"></a><aname="p20492152334010"></a>Font color of the selected item.</p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p449342311407"><aname="p449342311407"></a><aname="p449342311407"></a>Font size of the selected item. The value is of the length type, in pixels.</p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p20494323144012"><aname="p20494323144012"></a><aname="p20494323144012"></a>Font color of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total.</p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p1549532364020"><aname="p1549532364020"></a><aname="p1549532364020"></a>Font size of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total.</p>
<tdclass="cellrowborder"valign="top"width="40.01599840015999%"headers="mcps1.1.6.1.5 "><pid="p124957233408"><aname="p124957233408"></a><aname="p124957233408"></a>Font type of an item. Font family, in which fonts are separated by commas (,). Each font is set using a font name or font family name. The first font in the family or the font specified by <ahref="js-components-common-customizing-font.md">Custom Font Styles</a> is used for the text</p>
</td>
</tr>
</tbody>
</table>
## Events<a name="section103398253399"></a>
## Attributes
In addition to the [universal attributes](../arkui-js/js-components-common-attributes.md), the following attributes are supported.
| Name | Type | Default Value | Mandatory | Description |
| type | string | text | No | Type of the scrollable selector, which cannot be changed dynamically. Available values are as follows:<br>- **text**: text selector.<br>- **time**: time selector.<br>- **date**: date selector.<br>- **datetime**: date and time selector.<br>- **multi-text**: multi-column text selector.|
Text selector (**type** is **text**)
| Name | Type | Default Value | Mandatory | Description |
| range | Array | - | No | Value range of the text selector.<br>Use the data binding mode, for example, `range = {{data}}`. Declare the corresponding variable `data: ["15", "20", "25"]` in JavaScript.|
| selected | string | 0 | No | Default value of the text selector. The value is the index of **range**. |
| indicatorprefix | string | - | No | Prefix field added when a value is specified for the text selector. |
| indicatorsuffix | string | - | No | Suffix field added when a value is specified for the text selector. |
Time selector (**type** is **time**)
| Name | Type | Default Value | Mandatory | Description |
| containsecond | boolean | false | No | Whether seconds are contained. |
| selected | string | Current time | No | Default value of the time selector, in the format of HH:mm.<br>If seconds are contained, the format is HH:mm:ss.|
| hours | number | 24<sup>1-4</sup> | No | Time format used by the time selector. Available values are as follows:<br>- **12**: displayed in 12-hour format and distinguished by a.m. and p.m.<br>- **24**: displayed in 24-hour format.<br>Since API version 5, the default value is the most commonly-used hour format in the current locale.|
Date selector (**type** is **date**)
| Name | Type | Default Value | Mandatory | Description |
| start | <time> | 1970-1-1 | No | Start date of the date selector, in the format of YYYY-MM-DD. |
| end | <time> | 2100-12-31 | No | End date of the date selector, in the format of YYYY-MM-DD. |
| selected | string | Current date | No | Default value of the date selector, in the format of YYYY-MM-DD. |
| lunar<sup>5+</sup> | boolean | false | No | Whether the pop-up window displays the lunar calendar. |
| lunarswitch | boolean | false | No | Whether to display the lunar calendar switch in the date selector. When this switch is displayed, the user can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar.|
Date and time selector (**type** is **datetime**)
| Name | Type | Default Value | Mandatory | Description |
| selected | string | Current date and time | No | Default value of the date and time selector. The value can be in the format of MM-DD-HH-mm or YYYY-MM-DD-HH-mm. If the year is not set, the current year is used by default. The value you set is the date selected by default in the pop-up window.|
| hours | number | 24<sup>1-4</sup> | No | Time format used by the date and time selector. Available values are as follows:<br>- **12**: displayed in 12-hour format and distinguished by a.m. and p.m.<br>- **24**: displayed in 24-hour format.<br>Since API version 5, the default value is the most commonly-used hour format in the current locale.|
| lunar<sup>5+</sup> | boolean | false | No | Whether the pop-up window displays the lunar calendar. |
| lunarswitch | boolean | false | No | Whether to display the lunar calendar switch in the date and time selector. When this switch is displayed, the user can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar.|
Multi-column text selector (**type** is **multi-text**)
| Name | Type | Default Value | Mandatory | Description |
| columns | number | - | Yes | Number of columns in the multi-column text selector. |
| range | Two-dimensional array| - | No | Items of the multi-column text selector. The value is a two-dimensional array that indicates the number of columns. Each item in the array indicates the data of each column, for example, **[["a", "b"], ["c", "d"]]**.<br>Use the data binding mode, for example, `range = {{data}}`. Declare the corresponding variable `data: ["15", "20", "25"]` in JavaScript.|
| selected | Array | [0,0,0,…]| No | Default value of the multi-column text selector, which is an array consisting of the indexes of the selected items in each column.|
## Styles
In addition to the [universal styles](../arkui-js/js-components-common-styles.md), the following styles are supported.
| Name | Type | Default Value | Mandatory | Description |
| color | <color> | \#ffffff | No | Font color of a candidate item. |
| font-size | <length> | 16px | No | Font size of a candidate item. The value is of the length type, in pixels. |
| selected-color | <color> | #ff0a69f7 | No | Font color of the selected item. |
| selected-font-size | <length> | 20px | No | Font size of the selected item. The value is of the length type, in pixels. |
| disappear-color<sup>5+</sup> | <color> | \#ffffff | No | Font color of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total. |
| disappear-font-size<sup>5+</sup> | <length> | 14px | No | Font size of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total. |
| font-family | string | sans-serif | No | Font family of the selector, in which fonts are separated by commas (,). Each font is set using a font name or font family name. The first font in the family or the specified [custom font](../arkui-js/js-components-common-customizing-font.md) is used for the text.|
<tdclass="cellrowborder"valign="top"width="42.42424242424242%"headers="mcps1.1.4.1.3 "><pid="p17340122515397"><aname="p17340122515397"></a><aname="p17340122515397"></a>Triggered when a value is specified for the text selector.</p>
<tdclass="cellrowborder"valign="top"width="42.42424242424242%"headers="mcps1.1.4.1.3 "><pid="p4341225133916"><aname="p4341225133916"></a><aname="p4341225133916"></a>Triggered when a value is specified for the time selector.</p>
<pid="p1341192514397"><aname="p1341192514397"></a><aname="p1341192514397"></a>If seconds are contained, the value contains hour, minute, and second.</p>
<tdclass="cellrowborder"valign="top"width="50.41%"headers="mcps1.1.4.1.3 "><pid="p103419259392"><aname="p103419259392"></a><aname="p103419259392"></a>Triggered when a value is specified for the date selector.</p>
</td>
</tr>
</tbody>
</table>
Date and time selector \(**type** is **datetime**\)
<tdclass="cellrowborder"valign="top"width="50.41%"headers="mcps1.1.4.1.3 "><pid="p11342102563910"><aname="p11342102563910"></a><aname="p11342102563910"></a>Triggered when a value is specified for the date and time selector.</p>
</td>
</tr>
</tbody>
</table>
Multi-text selector \(**type** is **multi-text**\)
<tdclass="cellrowborder"valign="top"width="49.13%"headers="mcps1.1.4.1.3 "><pid="p1534352593917"><aname="p1534352593917"></a><aname="p1534352593917"></a>Triggered when the value of a column in the multi-column selector changes. <strongid="b3821122445914"><aname="b3821122445914"></a><aname="b3821122445914"></a>column</strong> indicates the column whose value has changed, <strongid="b15827124135915"><aname="b15827124135915"></a><aname="b15827124135915"></a>newValue</strong> indicates the selected value, and <strongid="b782722495913"><aname="b782722495913"></a><aname="b782722495913"></a>newSelected</strong> indicates the index of the selected value.</p>
| change | { hour: hour, minute: minute, [second:second]} | Triggered when a value is specified for the time selector.<br>If seconds are contained, the value contains hour, minute, and second.|
| change | { year:year, month:month, day:day, hour:hour, minute:minute } | Triggered when a value is specified for the date and time selector.|
| columnchange | { column:column, newValue:newValue, newSelected:newSelected } | Triggered when the value of a column in the multi-column selector changes. <br>**column**: column whose value has changed. <br>**newValue**: selected value. <br>**newSelected**: index of the selected value.|