PHP code example of zentheme / wpikaday

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

    

zentheme / wpikaday example snippets


use Zentheme\Customizer\Control\PikadayControl;

// Projects customizer configuration
add_action( 'customize_register', function( $wpCustomize ) {
    // Add a section...
    $wpCustomize->add_section( 'pikaday_section', [
        'title' => 'Pikaday Section'
    ] );
    
    // Then a setting...
    $wpCustomize->add_setting( 'pikaday_setting', [
        'default' => '',
        'transport' => 'postMessage'
    ] );
    
    // ...and finally add the Pikaday control
    $wpCustomize->add_control( 
        new PikadayControl( $wpCustomize, 'pikaday_control', [
            'label' => 'Pikaday Calendar',
            'section' => 'pikaday_section',
            'settings' => 'pikaday_setting',
            'position' => 'bottom right',   // position the  datepicker
            'format' => 'MMMM Do YYYY'      // define the date format
            // ... add any other valid Pikaday params here
        ] )
    );
} );