
Timepicker Ui Mcp
io.github.pglejzer由 GitHub 账号 pglejzer 发布v2.1.0更新于 Nov 2, 2026
MCP server for timepicker-ui: options, events, themes, public API, snippets and time validation.
概览
本地 MCP 服务器,提供 timepicker-ui 时间选择器库的参考资料:选项、事件、主题、公开 API、代码片段与时间校验。
- 可以做什么
- 查询按区域分组的 timepicker-ui 选项(clock、ui、labels、behavior、callbacks、wheel、range、timezone)。
- 查阅公开 API 方法、事件与回调签名,以及原生 JS 和框架的用法片段。
- 了解主题、range/timezone/wheel 插件的注册方式与升级说明。
- 按选择器的校验规则检查时间值。
- 适用场景
- 适合在使用 timepicker-ui 库开发或维护网页表单时,让助手直接在编辑器里回答配置、API、主题和升级相关问题。若不使用该库则无需安装。
- 运行要求
- 以本地 stdio 进程运行,从 npm 包 timepicker-ui-mcp 安装,需要 Node.js 与 npm。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Timepicker Ui Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
timepicker-ui
A time picker for web forms. Attach it to an <input> and users pick a time on a clock face or a scroll wheel.
[npm version] [downloads] [license] [Coverage Status] [Tests] [Socket Badge]
Live demo · Documentation · Changelog · React wrapper
Why timepicker-ui
- Zero dependencies.
- ~27 KB gzipped core. The range plugin is about 5 KB, the timezone plugin about 3 KB, the wheel plugin about 10 KB, and a plugin only gets bundled if you import it (bundle stats).
- Clock, wheel or compact wheel (a small dropdown under the input).
- Plain JS API, so it works the same in React, Vue, Angular, Svelte or without a framework.
- Doesn't touch
windowordocumenton import, so it's safe in Next.js, Nuxt and other SSR setups. - Keyboard and screen reader support. All texts, the screen-reader ones included, can be translated via
labels.
Features
- 12h / 24h, hour and minute steps, disabled times
- Optional seconds (
HH:MM:SS) in the clock, wheel and compact wheel - 12 themes (Material 2/3, Crane, Dark, Cyberpunk, Blueprint, ...)
- Inline mode (with an embedded variant for your own dialog), clear button, mobile layout
- Time ranges (linked or independent From/To) and timezones via plugins
- Disable times with a function (
clock.isTimeDisabled) - TypeScript types included
Installation
Quick start
No global CSS reset is needed: the picker sets box-sizing: border-box on its own elements (details).
API
Options
Grouped by area. Pass only what you need, the rest has defaults (full list).
Themes
Preview all of them: basic, crane, crane-straight, m3-green, m2, dark, glassmorphic, pastel, ai, cyberpunk, blueprint, blueprint-dark.
main.css is required and already includes basic. The rest are separate files:
Or import timepicker-ui/index.css to get all of them. Writing your own theme: styling guide.
Plugins
Range, timezone and wheel ship as separate imports. Register them once before creating pickers. You need WheelPlugin for the wheel and compact-wheel modes.
Upgrading
From 4.5 nothing breaks. 4.6 adds ui.inline.embedded, range.linked, clock.isTimeDisabled with refreshDisabledTime(), the setRange() / getRange() / setActivePart() methods, and a remover returned by on() / once(). See the CHANGELOG.
From 4.4, 4.5 adds optional seconds (clock.showSeconds) and fixes many bugs. It also renames many options to clearer names, for example ui.initialView instead of ui.mobile, and adds setOptions() in place of update(). The old names keep working until 5.0, and the options page lists every pair. A few changes can affect an existing setup: the AM/PM part of the value is always AM / PM whatever labels.am / labels.pm say, out-of-range clock.disabledTime.ranges edges such as 25:00 are reported as errors, the old .tp-ui-ripple classes are gone, and some focus-ring and radius tokens changed. The CHANGELOG lists them under "Check before upgrading".
From 4.3 nothing breaks. 4.4 adds the blueprint and blueprint-dark themes, 16 new labels.* for screen-reader text, and Home/End/PageUp/PageDown keys. See the CHANGELOG.
From 3.x, options are now grouped (clock, ui, labels, ...), events go through picker.on(), and CSS class names changed. There's a migration guide.
From 2.x, you have to import the CSS yourself and some event names changed (legacy guide).
Frameworks
React:
There's also a React wrapper (docs). Vue and Angular examples are in the quick start docs.
Need a date picker?
datepicker-ui is the companion calendar from the same author. It has no dependencies, follows Material Design 3, is safe to import during server rendering and uses the same theme names, so the two pickers match. It covers single dates, ranges and multiple dates.
The date and time guide shows how to use both pickers in one form.
Coming in 5.0
5.0.0 is planned but has no release date yet. 4.5.0 prepares for it. Planned changes:
- Plugins will be built and registered differently.
PluginRegistry.register(...)and the exported plugin types (PluginRegistry,Plugin,PluginManager,PluginFactory,TemplateProvider,ClearHandler,CoreState,EventEmitter) will change. The built-in range, timezone and wheel plugins stay. A migration guide ships with 5.0. - CSS class names keep the
tp-ui-prefix, but the part after it is reworked to follow Material Design component naming. Custom CSS that targets these classes will need updating. 5.0 ships a table of old and new names. - The options renamed in 4.5.0 lose their old names, for example
ui.mobile(nowui.initialView) andclock.smoothHourSnap(nowclock.discreteHourJump). The options page lists every pair. Theselect:am/select:pmevents go too (useselect:period), and so doesupdate()(usesetOptions()). behavior.returnFocusbecomestrueby default: on close, focus goes back to the input, or to thedata-openelement that opened the picker. Setbehavior.returnFocus: truenow to return focus to the input.- Code that is no longer needed is removed, including backward-compatibility paths for the deprecated items and dead code. This reduces bundle size and load cost for the core and each plugin. No size target is set yet. 4.5.0 already removes internal dead code that has no effect on the public API or markup. 5.0 removes the rest together with the items below.
- Items deprecated in 4.5.0 are removed:
OptionTypes(useTimepickerOptions)clock.currentTime.localesgetValue().degreesHoursandgetValue().degreesMinuteslabels.toggleLabel,labels.format24Label,labels.timezoneSelectorLabel- the legacy
focusInputAfterCloseModaloption (usebehavior.returnFocus) - the
hideevent andHideEventData(never emitted) - the
range:get-disabled-timeandrange:update-disabledevents (never emitted) ErrorEventData.rejectedHourandrejectedMinute(alwaysundefined)
- Also removed, because they do nothing or mislead:
- internal events in the public
TimepickerEventMap(range:minute:commit,animation:*) and its catch-all index signature, soon('typo')becomes a type error behavior.delayHandler(it only delays closing and never debounced buttons)TimepickerUI.isAvailable()(same asdocument.querySelector(...) !== null)- the undocumented DOM getters
hour,minutes,okButton,cancelButton,clockHand - the callback arguments of
open(cb)anddestroy()in both forms,destroy(cb)anddestroy({ callback })(useonce('open')or run the code after the call) RangeManager,TimezoneManagerandWheelManagerexported from the plugin entry points (you can't get an instance today, and the new plugin API replaces them)
- internal events in the public
- Changed events and options:
select:hour,select:minuteandselect:secondfire once when a value of their unit is picked, in every mode. Today, in clock mode, they fire when a field is activated, so picking an hour firesselect:minute. To follow face changes, useswitch:face, which 4.5.0 already emitsui.footerreplacesui.inline.showButtonsandwheel.hideFooter:falsehides OK, Cancel and Clear in every mode, andtrueshows them in inline mode toobehavior.commitOnChangereplacesui.inline.autoUpdateandwheel.commitOnScroll: each picked value is written to the input and emitsconfirm, and the picker stays openwheel.ignoreOutsideClickmoves tobehavior.ignoreOutsideClickand works in every mode, the clock modal included- the minute announcement reads
labels.minute, so its default changes fromMinutestoMinute ui.cssClassis applied to one element instead of two
- Package and CSS:
- the plugins no longer ship UMD builds (the UMD core never exposed
PluginRegistry, so they could not be registered from a<script>tag). The core UMD build stays - about 50 CSS custom properties that no rule reads are removed, for example
--tp-tertiary-container,--tp-on-tertiary-container,--tp-radius,--tp-hover-bgand 18 of the 34--tp-size-*tokens. 5.0 lists them all - the
./plugins/*wildcard inpackage.jsonexportsis removed, while./plugins/range,./plugins/timezoneand./plugins/wheelstay crane-straightbecomes a variant ofcranewith square corners (option name not decided)ui.keyboardIcon/ui.clockIcontake an element or a factory function instead of an HTML string
- the plugins no longer ship UMD builds (the UMD core never exposed
Details are on the roadmap.
Development
See app/README.md.
Contributing
Issues and PRs welcome on GitHub.
License
MIT © Piotr Glejzer
来源:README.md,提交 dd2664e
工具
0版本历史
3- v2.1.0最新Oct 19, 2026
- v2.0.0Oct 16, 2026
- v1.0.2Oct 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分