Description
bw_form_field_date – format a date field? oik v2.0 was delivered with jquery-ui-1.9.2.custom.css but originally expected jquery.ui.theme.css. How do we manage this in the future? 2013/06/26
Usage
bw_form_field_date( $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/includes/bw_metadata.phpLines:
1 to 11 of 11
function bw_form_field_date( $name, $type, $title, $value, $args ) { $args['#length'] = bw_array_get( $args, '#length', 10 ); wp_enqueue_style( "jquery-ui-datepicker-css", oik_url( "css/jquery.ui.datepicker.css" ) ); wp_enqueue_style( "jquery-ui-theme-css", oik_url( "css/jquery-ui-1.9.2.custom.css" ) ); bw_datepicker_enqueue_script(); bw_jquery( "#{$name}", "datepicker", bw_jkv( "dateFormat : 'yy-mm-dd', changeMonth: true, changeYear: true" ) ); if ( $value ) { $value = bw_format_date( $value ); } bw_form_field_( $name, $type, $title, $value, $args ); }View on GitHub View on Trac
Called by
Invoked by
Calls
1 to 7 of 7
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_datepicker_enqueue_script() – Enqueue the datepicker script
- bw_format_date() – Format a date with the specified format
- bw_form_field_() – bw_form_field_ – default formatting for a field – as a textfield
- bw_jkv() – Format an array of parms for jQuery
- bw_jquery() – Dynamic jQuery setting the selector, function and option parameters
- oik_url() – Return the URL for a resource file
