Download the PHP package ipub/form-datetime without Composer

On this page you can find all versions of the php package ipub/form-datetime. 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 form-datetime

Form Date, Date&Time and Time control

Build Status Latest Stable Version Composer Downloads

Forms control for adding date, date&time and time fields for Nette Framework forms

This extension is based on two datetime libraries. For Bootstrap template is used js library from Sebastien Malot and for UIkit template is used their datepicker and timepicker extensions.

Installation

The best way to install ipub/form-datetime is using Composer:

or

After that you have to register extension in config.neon.

In Nette 2.0, registration is done in app/bootstrap.php:

And you also need to include static files into your page:

note: You have to upload static files from client-site folder to your project.

Usage

You can pass configuration for each type of form field:

Settings for all types

You can enable additional buttons which can control showed form field:

Settings for Date picker

Just setup how date picker window should display:

Settings for Time picker

Just setup how time picker window should display:

Settings for Date & Time picker

This type of picker combines all settings from previous two types.

Defining date and time formats

You can set for each field its format how value should be displayed in form.

This two methods require JS format, so for two digits day/mont and four digits year write dd/mm/yyyy etc.

Validation

Validation can be done as on usual text input and also this fields support special ranges values.

If you need to define some range for selecting value, you can use filed range rule:

This rule will also create min and max for picker window, so user will be not able to pick date out of defined range.

There are also nex two rules for minimal and maximal value:

Custom templates and rendering

This control come with templating feature, that mean form element of this control is rendered in latte template. There are 3 predefined templates:

But be aware, if you choose different template than UIkit or Bootstrap, JS will be deactivated!

You can also define you own template if you need to fit this control into your layout.

Template can be set in form definition:

or in manual renderer of the form:

and if you want to switch default template to bootstrap or uikit just it write into template setter:

or


All versions of form-datetime with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
nette/application Version ~2.2
nette/di Version ~2.2
nette/forms Version ~2.2
nette/utils Version ~2.2
latte/latte Version ~2.2
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 ipub/form-datetime contains the following files

Loading the files please wait ....