PHP code example of mablae / datetimepicker-bundle
1. Go to this page and download the library: Download mablae/datetimepicker-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mablae / datetimepicker-bundle example snippets
bash
php composer.phar
php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Mablae\DatetimepickerBundle\MablaeDatetimepickerBundle(),
);
}
php
// ...
use Mablae\DatetimepickerBundle\Form\Type\DateTimeType;
public function buildForm(FormBuilder $builder, array $options)
{
$builder
// defaut options
->add('createdAt', DateTimeType::class)
// full options
->add('updatedAt', DateTimeType::class, array( 'pickerOptions' =>
array('format' => 'mm/dd/yyyy',
'viewMode' => 'days', // days, month, years, decades
)));
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.