Description
Implement bw_form_field_ hook for "time"This version of code works with
Usage
bw_form_field_time( $name, $type, $title, $value, $args );Parameters
- $name
- ( mixed ) required –
- $type
- ( mixed ) required –
- $title
- ( mixed ) required –
- $value
- ( mixed ) required –
- $args
- ( mixed ) required –
Returns
voidSource
File name: oik-dates/includes/oik-dates.incLines:
1 to 15 of 15
function bw_form_field_time( $name, $type, $title, $value, $args ) { $args['#length'] = bw_array_get( $args, '#length', 8 ); wp_enqueue_style( "jquery-ui-timepicker-css", oik_url( "css/timePicker.css", "oik-dates") ); bw_timepicker_enqueue_script(); ///bw_jquery( "#{$name}", "timePicker", bw_jkv( "dateFormat : 'hh-ii-ss', changeMonth: true, changeYear: true" ) ); //bw_jquery( "#{$name}", "timepicker" ); bw_jquery( "#{$name}", "timePicker", bw_jkv( "startTime: '00:00', endTime: '23:30', show24Hours: false, separator: ':', step: 30" ) ); if ( $value ) { $value2 = bw_format_date( $value, "H:i" ); bw_trace2( $value2, "value2" ); $value = $value2; } bw_form_field_( $name, $type, $title, $value, $args ); }
Called by
Invoked by
Calls
1 to 5 of 5
- bw_format_date() – Format a date with the specified format
- bw_jkv() – Format an array of parms for jQuery
- bw_timepicker_enqueue_script() – Enqueue the time picker debug script if needed otherwise enqueue the minified (packed) one
- bw_trace2() – Trace $value to the trace log file if tracing is active
- oik_url() – Return the URL for a resource file
Call hooks
API Letters:
