Date Pickerの__CAPGO_KEEP_0__ リポジトリ
このプラグインのインストールステップとフルマークダウンガイドを含むセットアッププロンプトをコピーします。
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.
インストール
セクションのタイトルは「インストール」AI-Assisted セットアップを使用してプラグインをインストールできます。次のコマンドを使用して、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.Manual セットアップを使用する場合は、以下のコマンドを実行してください。プラットフォーム固有の指示に従ってください。
npm install @capgo/capacitor-date-pickernpx cap syncImport
「Import」セクションimport { DatePicker } from '@capgo/capacitor-date-picker';日付を選択
日付を選択する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);時間を選択
時間を選択する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);Hide The Date Picker
Section titled “Hide The Date Picker”await DatePicker.hide();Platform Settings
Section titled “Platform Settings”await DatePicker.present({ mode: 'date', date: '2026-05-27', title: 'Select date', ios: { style: 'inline', theme: 'light', }, android: { theme: 'light', },});Common Settings
Section titled “Common Settings”| Option | Explanation |
|---|---|
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 |
|---|---|
![]() | ![]() |
API リファレンス
セクションのタイトル “API リファレンス”完全な API リファレンスは、パッケージの README と TypeScript の定義で管理されています:

