PHP code example of rulin132 / date-picker-bundle

1. Go to this page and download the library: Download rulin132/date-picker-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/ */

    

rulin132 / date-picker-bundle example snippets

 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Stnw\DatePickerBundle\StnwDatePickerBundle(),
    );
}
 php

    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
            ...
            ->add('startDate', 'datePicker' )
            ->add('endDate', 'dateTimePicker' )
            ...
        ;
    }
 php

    protected function configureDatagridFilters(DatagridMapper $datagrid)
    {
        $datagrid
            ->add('startDate', 'stnw_date_filter')
            ->add('endDateTime', 'stnw_date_time_filter')
        ;
    }