はじめに
このプラグインのフルマークダウンガイドとインストールステップのセットアッププロンプトをコピーしてください。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-date-picker`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/date-picker/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」と題されたセクションCapgoのAIアシストセットアップを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを使用してください:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-date-picker` plugin in my project.__CAPGO_KEEP_1__
npm install @capgo/capacitor-date-pickernpx cap sync__CAPGO_KEEP_3__
__CAPGO_KEEP_4__import { DatePicker } from '@capgo/capacitor-date-picker';__CAPGO_KEEP_5__
__CAPGO_KEEP_6__const result = await DatePicker.present({ mode: 'date', date: '2026-05-27', min: '2026-01-01', max: '2026-12-31', format: 'yyyy-MM-dd', title: 'Select date',});
console.log(result.value);__CAPGO_KEEP_7__
__CAPGO_KEEP_8__const result = await DatePicker.present({ mode: 'time', is24h: true, minuteStep: 15, format: 'HH:mm', title: 'Select time',});
console.log(result.value);日時を選択
日時を選択const result = await DatePicker.present({ mode: 'dateAndTime', date: '2026-05-27T14:30:00', format: "yyyy-MM-dd'T'HH:mm:ss", title: 'Select date and time',});月を選択
月を選択const result = await DatePicker.present({ mode: 'yearAndMonth', date: '2026-05-01', format: 'yyyy-MM', title: 'Select month',});範囲を選択
範囲を選択const range = await DatePicker.presentRange({ start: '2026-05-01', end: '2026-05-27', format: 'yyyy-MM-dd', startTitle: 'Start date', endTitle: 'End date',});
console.log(range.start, range.end, range.value);表示を非表示
表示を非表示await DatePicker.hide();プラットフォーム オプション
プラットフォーム オプションのセクションawait DatePicker.present({ mode: 'date', date: '2026-05-27', title: 'Select date', ios: { style: 'inline', theme: 'light', }, android: { theme: 'light', },});共通オプション
共通オプションのセクション| オプション | 説明 |
|---|---|
mode | date, time, dateAndTime, yearAndMonth, countDownTimer、または range. |
date | 初期に選択された値。 |
min / max | 最小値と最大値の選択可能な値。 |
format | 出力形式。 ISO、Java/Unicode、および Moment-style の一般的な形式がサポートされています。 |
title | ダイアログのタイトル。 |
locale | ネイティブのピッカーでサポートされている場合に使用されるロケール。 |
timezone | 時刻のパースとフォーマットに使用されるタイムゾーン。 |
is24h | 24時間の時刻を優先します。 |
minuteStep | 時計ピッカーの分間隔。 |
doneText / cancelText | カスタムアクションのラベル。 |
アプリの例
「アプリの例」というセクションのタイトルリポジトリには、Capacitorの例アプリが含まれており、ネイティブの日付ピッカー、時計ピッカー、範囲ピッカー、プラグインバージョンコールなどを開きます。 hide()iOS
| Android']} | Android |
|---|---|
![]() | ![]() |
@API リファレンス
@API リファレンス@APIの完全なリファレンスは、パッケージのREADMEとTypeScript定義で管理されています:

