npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rax-ui/date-picker

v1.0.0-beta.62

Published

--- display: Date Picker family: Form ---

Downloads

20

Readme


display: Date Picker family: Form

DatePicker

用于选择日期或者时间

API

Props

|名称 | 说明 | 类型 | 默认值 | |:---------------|:--------|:----|:----------| | type | 类型可选值: date, time, dateime, year, month | enum | date | | maxDate | 最大时间 | Date; | maxDate | 可选的最大日期 | Date | new Date(new Date().getFullYear() + 20, 11, 31, 23, 59, 59, 999) | | minDate | 可选的最小日期 | Date | new Date(2000, 0, 1, 0, 0, 0, 0) | | use12Hours | 是否使用 12 小时制 | bool | false | | selectSecond | 是否可以选择秒 | bool | false | | format | 时间格式化显示, 格式化函数基于 dayjs 实现 | string/func | getDefaultFormat | | label | 选择框文本 | node | | | labelWidth | label 宽度 | string | auto | | actionIcon | 选择框右侧的图标 | node | 'dropdown-down' | | value | 选择框的值(受控) | Date | | | defaultValue | 选择框的值(非受控)| Date | | | disabled | 是否被禁用 | bool | false | | solo | 是否只显示选择框内容(不包含 label 和 errorText 、HelpText) | bool | false | | outline | 是否显示边框 | bool | false | | placeholder | 选择框的提示文案 | string | | | helpText | 选择框底部的帮助文案 | node | | | errorText | 选择框底部的错误文案(设置此项后,选择框变为 error 状态,helpText 无效) | node | | | align | 选择框内容对齐方向 可选值: leftcenterright | enum | left | | prepend | 选择框的前置内容 | node | | | append | 选择框的后置内容 | node | | | clear | 是否可以被清除 | bool | false | | title | 选择器的标题文案 | string | | | renderSelection | 渲染已选择的内容 | (value: any, valueLabel: any) => RaxNode | | | onChange | 选择之后的回调 | (value: Date): void | | | onFocus | focus 事件的回调 | ():void | | | onBlur | blur 事件的回调 | ():void | | | onShow | 选择器打开时的回调 | ():void | | | onHide | 选择器关闭时的回调 | ():void | |

CSS API

Select CSS