If you want to post the value as soon as user has entered the date and click somewhere else, this might help you:
jQuery('#your-name').on('blur', function(){
var date_Value = this.value;
var ajaxdata = {
action: 'process_date',
date_value: date_Value
};
jQuery.post(ajaxurl, ajaxdata, function(res){
/* whatever you want to do, res contains the output generated by your php file*/
});
})
As you are using admin ajax, make a function to process this data.
function process_Date(){
$date = $_POST['date_value'];
/* do whatever you want to do with your $date*/
/* return an output */
die(1);
}
add_action('wp_ajax_process_date', 'process_Date');
add_action('wp_ajax_nopriv_process_date', 'process_Date');
Add this function to your file where you are having other functions.
Related Posts:
- Objective Best Practices for Plugin Development? [closed]
- How can I add an option to the Page Template list from a Plugin?
- Using composer for dependency management in plugindevelopment
- wp_mail is undefined
- How do you use the plugin boilerplate loader class to hook actions and filters?
- Build path for a custom portfolio plugin
- How to save block attributes when the output doesn’t change
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- How to: Rest endpoint returning empty object
- Ensuring a plugin is loaded/run last?
- Script to remove all inactive widgets?
- Scheduled event does not run at midnight
- Plugin options table,is the data serialized
- How to check if current static page is frontpage from admin plugin
- Woocommerce add custom button to backend order table
- Converting theme widgets to plugins?
- Sample — test — data for large WordPress install
- DIR vs URI when defining a path to a file
- Earliest WP Hook to Safely and Reliably Redirect
- What is rich_editing?
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- JS / JQuery form validation in backend admin menus
- Is using register_activation_hook required?
- Synchronize Custom post type tags to WordPress default posts tags
- Is it possible to delay execution of shortcode output callback?
- Tabbed navigation for plugin options using same row in database for all?
- wp_enqueue_script + wp_enqueue_style Since When
- How to send email in wordpress with more than one attachments
- How to debug a unit test for a WordPress plugin, which uses wordpress-test?
- Is there any way to allow a plugin to write over a previous version?
- How do i validate data entered in a meta box so that only floats can be entered in a field?
- Modify users.php page to create page/post on button clicked
- Is there an action like ‘after_register_custom_post_type’?
- get_current_screen() return null
- Frontend language per user
- Tried in different ways but sidebar not working?
- How to get results of subcategories also?(WP Rest Api v2)
- How to run a function on plugin’s options page?
- What stylesheets are available in core?
- dbDelta using Foreign key not working on update [duplicate]
- Activate User in Code (BuddyPress+bbpress)
- Plugin widget zindex changes depending on theme [closed]
- Search: how to extend the existing search to include a custom table
- Plugin development: delete options when updating to a new version
- Is there documentation reference for forms in menu and setting pages?
- Custom code for WordPress dynamic menu
- Plugin templates vs Parent Theme
- wpdb->prepare and mysql UPDATE – how is it done?
- How to get all queries’s results after they have executed?
- Custom entity search and display
- why update option is not working?
- ECHO Executing 4 Times In Head
- Difficult to create unique titles and meta description?
- post_title is empty on global $post object
- wp_schedule_event custom event time
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- WordPress shortcode using WPB_GET_IP
- How to properly package a block plugin
- How to create post favorite function without plugins
- Mock a dependency of a WP_REST_Controller class
- Remove All Taxonomies from Post On Update
- How add default term meta to prevent an error?
- How to get current logged-in user details in multisite?
- Data inserted by wpdb insert is different than data pressnt in database.
- Cleaning a filename after image sideloading a url that contains `%20`
- Plugin admin page stylesheet doesn’t work
- wp login redirect loop reauth=1
- Paragraph Tags removed when contents are only a shortcode
- how to show youtube comment profile pic in wordpress
- When I activate my custom plugin the menus and some styling of my site is messed up
- I need to combine Pages Listing and Main Menu from frontend in WordPress
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- Query String Filtering API
- update_option() passing empty array() but still updating
- Bad request 400 using class based files
- Gutenberg block breaks when showing new data
- Allow contributor user role to perform copy operation PHP
- How to use own css of functionality plugin?
- Get Custom taxonomy parent with wordpress REST API
- Insert, update or remove data from database (usermeta)
- AJAX call of function containing javascript which is not loaded (Plugin development)
- Hide post by ‘post_category’
- How do I make two shortcode use the same id and increment it when I use them multiple times?
- How to CRUD from wordpress database in wordpress theme?
- How can I query 3 posts from diferente categories (one of each category)
- Can a plugin differentiate syndication feeds from actual site views?
- Plugin settings checkbox
- Load JS/CSS of shortcode in post
- update_option() updating the option with an empty value?
- Adding querystring variable breaks admin URLs
- How to check during “pre_get_posts” if WP performing default query for specific custom template?
- Saving multiple fields as array
- Serialized Data
- I don’t understand how symlinks in plugin work
- Undo operation not working in Rich text [Gutenberg]
- Update custom settings field in plugin
- URL rewrite parameter lost (add_rewrite_rule)
- PHPUnit Ajax Serialization of ‘Closure’ is not allowed
- Anyway to prevent admin from seeing other admin’s product?