I've tried this code but not sure why it's not working:
add_filter('frm_date_field_js', 'change_start_day');
function change_start_day($args){
if($args['field_id'] == 10){
$args['firstDay'] = 1;
}
return $args;
}
I'm not sure where you got that code, but it ain't ever gonna work :). Substitute the field KEY of the date field in where you see 'rqaj9'.
add_filter('frm_date_field_js', 'change_start_day'); function change_start_day($field_key) { /* the examples use "field_id" but it's the key */ if ($field_key == 'field_rqaj9') { echo ',firstDay: 1'; } }
xD thanks.
That works but doesn't seem to work at all with the advanced datepicker options. I'm guessing it's just overwriting all the options?
It appends a "parameter" javascript that is the datepicker. It should be used for all parameters that aren't covered by the Formidalbe datepicker addon as long as you have the correct syntax.
Yeah I suspect a syntax error caused by it being an inline date field.
I used this instead and it works:
add_filter( 'frm_date_field_options', 'add_blackout_dates', 30, 2 ); function add_blackout_dates( $js_options, $extra ) { if ( $extra['field_id'] === 'field_2u7es' ) { $js_options['options']['firstDay'] = 1; } return $js_options; }
Please login or Register to submit your answer