Hi
Change date format in Dashboard >> Settings >> General >> Date Format.
Bests,
Thread Starter
wp3fan
(@wp3fan)
Hi,
Changing the Date Format in the WP Settings doesn’t help.
When I enter “d.m.Y” as Date Format, your plugin displays the american Date Format instead.
When I add these lines in your switch statement in the hb_date_time_format_js() function, it works:
case 'd.m.Y':
$return = 'dd.mm.yy';
break;
Cheers,
wp3fan
Thread Starter
wp3fan
(@wp3fan)
So, are you going to fix it? It would be great if you did.
I looked into the code and the problem is, that you validate the Date Format that is set in the WP Settings:
// date time format
function hb_date_time_format_js() {
// set detault datetime format datepicker
$dateFormat = hb_get_date_format();
switch ( $dateFormat ) {
case 'Y-m-d':
$return = 'yy-mm-dd';
break;
//
case 'Y/m/d':
$return = 'yy/mm/dd';
break;
case 'd/m/Y':
$return = 'dd/mm/yy';
break;
//
case 'd-m-Y':
$return = 'dd-mm-yy';
break;
case 'm/d/Y':
$return = 'mm/dd/yy';
break;
//
case 'm-d-Y':
$return = 'mm-dd-yy';
break;
case 'F j, Y':
$return = 'MM dd, yy';
break;
default:
$return = 'mm/dd/yy';
break;
}
return $return;
}
As there is no “case ‘d.m.Y'”, the “default” switch statement is executed and the default american date (mm/dd/yy) returned.
So basically, you’d have to add a “case ‘d.m.Y'”-statement, like the statement I’ve written in my second post.
If you need any help, I’d be glad to help you out.
Plugin Contributor
Lee
(@leehld)
Dear @wp3fan,
So, what you want is add case ‘d.m.Y’ in hb_date_time_format_js() function of WP Hotel Booking plugin?
Lee
-
This reply was modified 9 years ago by
Lee.
Plugin Contributor
Lee
(@leehld)
Ok @wp3fan,
Please delete WP Hotel Booking plugin in your site and reinstall it. I update date time format js in the plugin to meet your request.
Please check it again.
Best Regards,
Lee
-
This reply was modified 9 years ago by
Lee.