Save datapicker date into wordpress admin
Save datapicker date into wordpress admin
Save datapicker date into wordpress admin
Please check if echoing $fxdate is working. $fxdate = get_field(‘fl_date’); In ACF simply below code works, if($fxdate){ echo “set”; } else { echo “not set”; }
I did it! In the end, I used the standard $_REQUEST and $_GET to store and fetch the value in the date-picker instead of all the fancy hooks and filters. The only thing I am not able to fathom out is the deal with input type-button. It was not storing the value in $_REQUEST. But … Read more
After debugging, I noticed that the formId in the hooked function for filter was actually fieldId for the date field and hence the fieldId undefined. Here no actual formId is received in hooked JS filter function and the actual fieldId is passed as formId. So, quick workaround I applied using formId only, is: // Allow … Read more
for less time you can use ACF plugin for this https://www.advancedcustomfields.com/resources/date-time-picker/
In meta_query, you missed the type of the field: $args = array( ‘post_type’ => ‘events’, ‘posts_per_page’ => ‘-1’, ‘meta_query’ => array( array( ‘key’ => ‘event_date_start’ , ‘compare’ => ‘>=’, ‘value’ => current_time(‘Ymd’), ‘type’ => ‘DATE’, ) ), ‘meta_key’ => ‘event_date_start’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’ );
This must have been a conflict in my site. TBH, I wasn’t able to spot the conflict, but I was able to circumvent it by setting the necessary lang strings just before datepicker’s initiation like so: $(function() { $.datepicker.regional[‘el’] = { closeText: ‘Κλείσιμο’, prevText: ‘Προηγούμενος’, nextText: ‘Επόμενος’, currentText: ‘Σήμερα’, monthNames: [‘Ιανουάριος’, ‘Φεβρουάριος’, ‘Μάρτιος’, ‘Απρίλιος’, ‘Μάιος’, … Read more
This library will allow you to populate a series of fields in 2-week increments. https://gravitywiz.com/populate-dates-gravity-form-fields/ The configuration would look something like this: new GW_Populate_Date( array( ‘form_id’ => 123, ‘source_field_id’ => 1, ‘target_field_id’ => 4, ‘modifier’ => ‘+2 weeks’ ) ); new GW_Populate_Date( array( ‘form_id’ => 123, ‘source_field_id’ => 1, ‘target_field_id’ => 5, ‘modifier’ => ‘+4 … Read more
Compare ACF date field (if exists) and post date and order DESC
This line shouldn’t be in there: <script type=”text/javascript” src=”http://xxxx/wp-includes/js/jquery/ui/jquery-ui.min.js”></script> In a standard WordPress install, no such file exists. This makes me wonder how you are adding the scripts to the theme in the first place. Are you using wp_enqueue_styles? If not, there is a VERY good chance that you are indeed adding two versions of … Read more