Download the PHP package codingwithrk/nativephp-datetime-picker without Composer

On this page you can find all versions of the php package codingwithrk/nativephp-datetime-picker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nativephp-datetime-picker

NativePHP DateTime Picker

Native date, time and datetime picker for NativePHP Mobile.

Installation

For local development, add a path repository to your app's composer.json:

How it works

The picker is modal and asynchronous. Calling it opens the native picker and immediately returns a request id (a string). The value the user selects is delivered later as a native event. Always pair a call with an event listener.

Usage (PHP / Livewire)

Quick helpers

Usage (JavaScript / Inertia + Vue / React)

The JS event helpers subscribe to the native-event DOM event that NativePHP Mobile dispatches on document (the same channel window.Native.on() uses), filtering by event class. In a Livewire app, prefer the #[OnNative] attribute shown above.

API

Builder — DateTimePicker::make()

Method Description
mode('date'\|'time'\|'datetime') Set the picker mode
date() Date-only mode
time(bool $use24h = true) Time-only mode
time12h() Time-only, AM/PM clock
dateTime() Combined date + time
min($date) Earliest selectable moment (DateTimeInterface or string)
max($date) Latest selectable moment
current($date) / initial($date) Value the picker opens on (default: now)
title(?string $title) Heading shown above the wheels
use24h(bool $value = true) / use12h() Clock format for time modes
locale(?string $locale) BCP-47 locale hint (en, de, ar, …)
withChangeEvents(bool $value = true) Stream DateTimePickerChanged while scrolling (iOS only)
id(string $id) Provide your own correlation id
show(): string Present the picker; returns the request id

Convenience methods on the facade

DateTimePicker::date(), ::time(), ::time12h(), ::dateTime() — each accepts an optional initial value and returns the request id.

Events

Event Payload
Events\DateTimePickerConfirmed string $value, string $mode, int $timestamp, ?string $id
Events\DateTimePickerCancelled ?string $id
Events\DateTimePickerChanged same as Confirmed — iOS only, opt-in via withChangeEvents()

$value is a local ISO-8601 string with no timezone (Y-m-d\TH:i:s). $timestamp is milliseconds since the Unix epoch. DateTimePickerConfirmed / DateTimePickerChanged expose a date() helper returning a Carbon instance.

Permissions

None.

Platform notes

Testing

License

MIT — see LICENSE.


All versions of nativephp-datetime-picker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
nativephp/mobile Version ^3.0 || ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codingwithrk/nativephp-datetime-picker contains the following files

Loading the files please wait ...