<?php

use WpBookingEvent\Utilities\Utility;
use WpBookingEvent\Html\WpBookingEventHtmlBackend as WpBookingEventHtmlBackendAlias;
use WpBookingEvent\Factory;
use WpBookingEvent\Language\Text;

defined('_WPBOOKINGEVENT_EXEC') or die;
extract($displayData);


WpBookingEventHtmlBackendAlias::load_jquery_library('dateselect');

$doc = Factory::getDocument();
$id_by_name = "element_field_". $name;
?>
    <div id="<?php esc_attr_e($id_by_name) ?>" class="field-birthday">
        <div class="row">
            <div class="col-md-12">
                <div class="input-group">
                    <input type="text" class="form-control" id="date-<?php esc_attr_e($name); ?>" name="<?php esc_attr_e($name); ?>"
                           value="<?php esc_attr_e($value) ?>"  data-select="date" placeholder="<?php esc_attr_e('Birthday','wpbookingevent')?>"/>
                    <span class="input-group-btn">
                    <button class="btn btn-primary" type="button" data-toggle="select"><i class="fa fa-calendar"></i></button>
                </span>
                </div>
            </div>
        </div>
    </div>
<?php
$doc->addScriptApplySelector('.field-birthday', 'field_birthday', array(
    "input_name" => $name,
), 'admin/app/layouts/WooBooking/form/field/birthday/jquery.birthday.js');
