Home Forums WC Vendors Pro Support Adding Time to Front-End Date Picker

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #60724
    Jonathan
    Participant

    I am having trouble adding the time (00:00) to the Front-End Date Picker for the Start Date/End Date. With the WooCommerce Simple Auctions Integration, this is important because right now there is no way for vendors to make the listing start and end at specific hours/minutes, only the day. This results in the auction always starting and ending at Midnight.

    In the Back-End Admin panel, the time options are shown in the date picker, below it. In the front-end, there is no time options underneath the date picker. (See Pic)

    #60726
    Jonathan
    Participant

    I believe the relevant code may be in class-wcv-simple-auctions.php:

    WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_start_date', array( 
    			'post_id'		=> $post_id, 
    			'id' 			=> '_auction_dates_from', 
    			'label' 		=> __( 'From', 'wcvendors-pro-simple-auctions' ), 
    			'class'			=> 'wcv-datepicker', 
    			'placeholder'	=> __( 'From…', 'placeholder', 'wcvendors-pro-simple-auctions' ). ' YYYY-MM-DD ',  
    			'wrapper_start' => '',
    			'wrapper_end' 	=> '', 
    			'custom_attributes' => array(
    				'maxlenth' 	=> '10', 
    				'pattern' 	=> '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])'
    				),
    			) )
    		);
    
    		WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_end_date', array( 
    			'post_id'			=> $post_id, 
    			'id' 				=> '_auction_dates_to', 
    			'label' 			=> __( 'To', 'wcvendors-pro-simple-auctions' ), 
    			'class'				=> 'wcv-datepicker', 
    			'placeholder'		=> __( 'To…', 'placeholder', 'wcvendors-pro-simple-auctions' ). ' YYYY-MM-DD ', 
    			'wrapper_start' 	=> '',
    			'wrapper_end' 		=> '', 
    			'desc_tip'			=> true, 
    			'custom_attributes' => array(
    				'maxlenth' 		=> '10', 
    				'pattern' 		=> '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])'
    				),
    			) )
    		);
    
    		echo '</div>'; 
    
    #60750
    Jonathan
    Participant

    Bump

    #60755
    Jonathan
    Participant

    I think I fixed it for those affected (Anyone who uses WooCommerce Simple Auctions Integration):

    1)In class-wcv-simple-auctions.php, change wcv-datepicker to wcv-datetimepicker

    This will not display the time picker, but…when you go select a date/time, the date will probably be improperly displayed as F Y , j or something like that.

    2) Now you need to go to Settings -> General, and change your time format. Don’t try YY-MM-DD, as WordPress will display this as 1717-0404-0505 (rather than 17-04-05). You can fiddle around in the custom time settings, what worked for me was simply M-D

    3) Now go back to class-wcv-simple-auctions.php and change the Placeholder to match your date format choice.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.