<?php
defined('ABSPATH') or die('No script kiddies please!!');
?>
<div class="std-form-each-component">
    <?php include(STD_PATH . '/inc/views/backend/js-templates/custom-fields/tmpl-custom-field-head.php'); ?>
    <div class="std-component-body" style="display: block;">
        <?php include(STD_PATH . '/inc/views/backend/js-templates/custom-fields/tmpl-custom-common-fields.php'); ?>
        <div class="std-field-wrap">
            <label><?php esc_html_e('Date Format', 'subscribe-to-download'); ?></label>
            <div class="std-field">
                <select name="<?php echo esc_attr($field_name_prefix) ?>[date_format]">
                    <?php
                    $std_datepicker_formats = array(
                        array('format' => 'mm/dd/yy', 'label' => esc_html__('Default', 'subscribe-to-download')),
                        array('format' => 'yy-mm-dd', 'label' => esc_html__('ISO 8601', 'subscribe-to-download')),
                        array('format' => 'd M, y', 'label' => esc_html__('Short', 'subscribe-to-download')),
                        array('format' => 'd MM, y', 'label' => esc_html__('Medium', 'subscribe-to-download')),
                        array('format' => 'DD, d MM, yy', 'label' => esc_html__('DD, d MM, yy', 'subscribe-to-download')),
                        array('format' => "'day' d 'of' MM 'in the year' yy", 'label' => esc_html__('With text', 'subscribe-to-download'))
                    );
                    $std_datepicker_formats = apply_filters('std_datepicker_formats', $std_datepicker_formats);
                    foreach ($std_datepicker_formats as $datepicker_format_array) {
                    ?>
                        <option value="<?php echo esc_attr($datepicker_format_array['format']); ?>"><?php echo esc_html($datepicker_format_array['label']); ?> - <?php echo esc_html($datepicker_format_array['format']); ?></option>
                    <?php
                    }
                    ?>
                </select>
            </div>
        </div>
    </div>
</div>