Change Date Format

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 7 reply threads
  • Author
    Posts
    • #17922
      info17
      Participant

      hi again, i try to find in .po files from your plugins (also from dokan) but i dont find the solution.

      i need to change all date format in your plugins from yyyy-mm-dd to dd-mm-yyyy
      and in textform 15. January 2018 not January 15 2018
      check printscreens πŸ™‚

      Attachments:
      You must be logged in to view attached files.
    • #17944
      WCFM Forum
      Keymaster

      Hi,

      This is absolutely possible to achieve for Product manager fields.
      Let me check, if this possible for Reports page or not?

      “and in textform 15. January 2018 not January 15 2018” – where yo have this? Hope your WP date settings is as per your requirement!

      Thank You

    • #17946
      info17
      Participant

      yep, WP date settings are correct (printscreen)

      and β€œand in textform 15. January 2018 not January 15 2018”
      this is in “all products/appointments” overview

      Attachments:
      You must be logged in to view attached files.
    • #17963
      WCFM Forum
      Keymaster

      Hi,

      Kindly add this code to your site, this will change Product Manager Date format –

      function wcfm_custom_wcappointments_cost_fields( $cost_fields, $product_id ) {
      	if( isset( $cost_fields['_wc_appointment_cost_rules'] ) && isset( $cost_fields['_wc_appointment_cost_rules']['options'] ) ) {
      		if( isset( $cost_fields['_wc_appointment_cost_rules']['options']['from_custom'] ) ) {
      			$cost_fields['_wc_appointment_cost_rules']['options']['from_custom']['placeholder'] = 'DD-MM-YYYY';
      			$cost_fields['_wc_appointment_cost_rules']['options']['from_custom']['custom_attributes'] = array( 'date_format' => 'dd-mm-yy');
      		}
      		if( isset( $cost_fields['_wc_appointment_cost_rules']['options']['to_custom'] ) ) {
      			$cost_fields['_wc_appointment_cost_rules']['options']['to_custom']['placeholder'] = 'DD-MM-YYYY';
      			$cost_fields['_wc_appointment_cost_rules']['options']['to_custom']['custom_attributes'] = array( 'date_format' => 'dd-mm-yy');
      		}
      	}
      	return $cost_fields;
      }
       
      add_filter( 'wcfm_wcappointments_cost_fields', 'wcfm_custom_wcappointments_cost_fields', 50, 2 );
      
      function wcfm_custom_wcappointments_availability_fields( $availability_fields, $product_id ) {
      	if( isset( $availability_fields['_wc_appointment_availability_rules'] ) && isset( $availability_fields['_wc_appointment_availability_rules']['options'] ) ) {
      		if( isset( $availability_fields['_wc_appointment_availability_rules']['options']['from_custom'] ) ) {
      			$availability_fields['_wc_appointment_availability_rules']['options']['from_custom']['placeholder'] = 'DD-MM-YYYY';
      			$availability_fields['_wc_appointment_availability_rules']['options']['from_custom']['custom_attributes'] = array( 'date_format' => 'dd-mm-yy');
      		}
      		if( isset( $availability_fields['_wc_appointment_availability_rules']['options']['to_custom'] ) ) {
      			$availability_fields['_wc_appointment_availability_rules']['options']['to_custom']['placeholder'] = 'DD-MM-YYYY';
      			$availability_fields['_wc_appointment_availability_rules']['options']['to_custom']['custom_attributes'] = array( 'date_format' => 'dd-mm-yy');
      		}
      	}
      	return $availability_fields;
      }
       
      add_filter( 'wcfm_wcappointments_availability_fields', 'wcfm_custom_wcappointments_availability_fields', 50, 2 );

      Please know me is this works for you or not!

      Thank You
      Simha

    • #17966
      info17
      Participant

      hi again, first thank you for your help.
      unfortunately is not working everywhere.
      still have wrong format (yyyy-mm-dd) in
      – wcfm-appointments-details
      – wcfm-reports-sales-by month/date/7days etc
      – wcfm-coupons-manage
      – wcfm-coupons
      – wcfm-appointments-staffs-manage
      – wcfm-analytics month/date/7days etc

      and in wcfm-products show January 1, 2018 instead of 1. January, 2018

      sorry for this long list, normaly the date format works from backend settings in wp.
      if you change this for next update you dont have to send me the code for functions.php because the page goes live not before end of the month:)

      you have a paypal email, i like to spend something for your effort!!!

      Attachments:
      You must be logged in to view attached files.
    • #17973
      WCFM Forum
      Keymaster

      Hi,

      This is code will not change date format every where, it’s only for Appointment Product creation fields.

      Really thanks for the list, we will take a look at all those.

      Actually, there has two type of dates, one is input types and another is information display type.

      We will use WP date settings for all this in next update, hope then there will no such issues.

      If you want to donate us something then may use “payment@wclovers.com” as our PayPal email.

      If you get a chance then please add a review for me as well -https://wordpress.org/support/plugin/wc-frontend-manager/reviews/
      If you already did that then we are really thankful to you.

      Just to mention, WCFM next update will be there in 3-4 days and hope then there will be no more date issues.

      Really thanks for your cooperation.

      Regards
      Shhiv

    • #17974
      info17
      Participant

      at the moment i have no login on wordpress to get a review, but i think now its time to get one..
      i will transfer something for you in the next days via paypal because i am very happy with your support!!
      thanks and have a great day/evening πŸ™‚

    • #17979
      WCFM Forum
      Keymaster

      It’s ok, whenever you have time do it.
      I am also happy to you, specially few things are really helpful WCFM as well.

      Really thanks for your cooperation.

Viewing 7 reply threads
  • The topic ‘Change Date Format’ is closed to new replies.