@vemuez
you need to enqueue js and css files to admin_print_script and admin_print_style
here is the example to how to do it
// Register datepicker ui for properties
function admin_homes_for_sale_javascript()
{
global $post;
if($post->post_type == 'homes-for-sale' && is_admin()) {
wp_enqueue_script('jquery-ui-datepicker', WP_CONTENT_URL . '/themes/yourthemename/js/jquery-ui-datepicker.min.js');
}
}
add_action('admin_print_scripts', 'admin_homes_for_sale_javascript');
// Register ui styles for properties
function admin_homes_for_sale_styles(){
global $post;
if($post->post_type == 'homes-for-sale' && is_admin()) {
wp_enqueue_style('jquery-ui', WP_CONTENT_URL . '/themes/yourthemename/css/jquery-ui-1.8.11.custom.css');
}
}
add_action('admin_print_styles', 'admin_homes_for_sale_styles');
or try this
https://en.bainternet.info/how-i-add-a-wordpress-metabox/#toc-dn