Mulai
Copas prompt pengaturan dengan langkah instalasi dan panduan markdown lengkap untuk plugin ini.
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.
Bagian berjudul “Pasang”
Copy untuk AIAnda dapat menggunakan Setup yang Dibantu AI kami untuk menginstal plugin. Tambahkan Capgo kemampuan ke alat AI Anda menggunakan perintah berikut:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsKemudian gunakan prompt berikut:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-date-picker` plugin in my project.Jika Anda lebih suka Setup Manual, instal plugin dengan menjalankan perintah-perintah berikut dan ikuti instruksi spesifik platform di bawah ini:
npm install @capgo/capacitor-date-pickernpx cap syncimport { DatePicker } from '@capgo/capacitor-date-picker';Pilih Tanggal
Bagian berjudul “Pilih Tanggal”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);Pilih Waktu
Bagian berjudul “Pilih Waktu”const result = await DatePicker.present({ mode: 'time', is24h: true, minuteStep: 15, format: 'HH:mm', title: 'Select time',});
console.log(result.value);Pilih Tanggal dan Waktu
Bagian berjudul “Pilih Tanggal dan Waktu”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',});Pilih Bulan
Bagian berjudul “Pilih Bulan”const result = await DatePicker.present({ mode: 'yearAndMonth', date: '2026-05-01', format: 'yyyy-MM', title: 'Select month',});Pilih Rentang
Bagian berjudul “Pilih Rentang”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);Tutup Pemilih
Bagian berjudul “Tutup Pemilih”await DatePicker.hide();Opsi Platform
Bagian berjudul “Opsi Platform”await DatePicker.present({ mode: 'date', date: '2026-05-27', title: 'Select date', ios: { style: 'inline', theme: 'light', }, android: { theme: 'light', },});Opsi Umum
Bagian berjudul “Opsi Umum”| Opsi | Deskripsi |
|---|---|
mode | date, time, dateAndTime, yearAndMonth, countDownTimerAtau range. |
date | Nilai awal yang dipilih. |
min / max | Nilai minimum dan maksimum yang dapat dipilih. |
format | Format keluaran. Format ISO, Java/Unicode, dan umum Moment-style yang didukung. |
title | Judul dialog. |
locale | Wilayah yang digunakan oleh picker native di mana didukung. |
timezone | Zona waktu yang digunakan untuk parsing dan pengaturan. |
is24h | Gunakan waktu 24 jam. |
minuteStep | Interval menit picker waktu. |
doneText / cancelText | Label aksi kustom. |
Aplikasi Contoh
Bagian berjudul “Aplikasi Contoh”Repository tersebut termasuk sebuah Capacitor contoh aplikasi yang membuka picker tanggal native, picker waktu, picker rentang, dan versi plugin. hide()iOS
| Android | Demo animasi iOS dari @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-date-picker membuka, memilih tanggal, dan menutup. |
|---|---|
![]() | ![]() |
Bagian berjudul “API Referensi”
Referensi API yang lengkap dipelihara dalam README paket dan definisi TypeScript:The complete API reference is maintained in the package README and TypeScript definitions:

