1 | <?php |
||
8 | class Date_Field extends Field { |
||
9 | |||
10 | /** |
||
11 | * Picker type. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $picker_type = 'datepicker'; |
||
16 | |||
17 | /** |
||
18 | * Picker options. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | public $picker_options = array( |
||
23 | 'dateFormat' => 'yy-mm-dd', |
||
24 | 'altFormat' => 'yy-mm-dd', |
||
25 | 'altInput' => true, |
||
26 | ); |
||
27 | |||
28 | /** |
||
29 | * The storage format in variant that can be used by JavaScript. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $storage_format = 'YYYY-MM-DD'; |
||
34 | |||
35 | /** |
||
36 | * Returns an array that holds the field data, suitable for JSON representation. |
||
37 | * |
||
38 | * @param bool $load Should the value be loaded from the database or use the value from the current instance. |
||
39 | * @return array |
||
40 | */ |
||
41 | public function to_json( $load ) { |
||
52 | |||
53 | /** |
||
54 | * Hook administration scripts and styles. |
||
55 | */ |
||
56 | public static function admin_enqueue_scripts() { |
||
61 | |||
62 | /** |
||
63 | * Set datepicker options |
||
64 | */ |
||
65 | public function set_picker_options( $options ) { |
||
69 | } |
||
70 |