Skip to content

Commit c3b45a7

Browse files
authored
Merge pull request #302 from sumitwebkul/gli-207
Resolved: On translating, page checking and checkout dates are changed to NaN-NaN-NaN
2 parents 8f928b7 + 78c164f commit c3b45a7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

modules/wkroomsearchblock/views/js/wk-room-search-block.js

+7
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ $(document).ready(function() {
6363
return highlightSelectedDateRange(date, $("#check_in_time").val(), $("#check_out_time").val());
6464
},
6565
beforeShow: function (input, instance) {
66+
// So that on translating page date is translated to NaN-NaN-NaN
67+
$('.ui-datepicker').addClass('notranslate');
68+
6669
var date_to = $('#check_in_time').val();
6770
if (typeof date_to != 'undefined' && date_to != '') {
6871
var date_format = date_to.split("-");
@@ -82,6 +85,10 @@ $(document).ready(function() {
8285
dateFormat: 'dd-mm-yy',
8386
minDate: 0,
8487
dayNamesMin: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
88+
beforeShow: function (input, instance) {
89+
// So that on translating page date is translated to NaN-NaN-NaN
90+
$('.ui-datepicker').addClass('notranslate');
91+
},
8592
//for calender Css
8693
beforeShowDay: function (date) {
8794
// highlight dates of the selected date range

themes/hotel-reservation-theme/js/product.js

+7
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,10 @@ $(document).ready(function() {
11001100
showOtherMonths: true,
11011101
dateFormat: 'dd-mm-yy',
11021102
minDate: 0,
1103+
beforeShow: function (input, instance) {
1104+
// So that on translating page date is translated to NaN-NaN-NaN
1105+
$('.ui-datepicker').addClass('notranslate');
1106+
},
11031107
beforeShowDay: function (date) {
11041108
// highlight dates of the selected date range
11051109
return highlightSelectedDateRange(date, $("#room_check_in").val(), $("#room_check_out").val());
@@ -1156,6 +1160,9 @@ $(document).ready(function() {
11561160
showOtherMonths: true,
11571161
dateFormat: 'dd-mm-yy',
11581162
beforeShow: function (input, instance) {
1163+
// So that on translating page date is translated to NaN-NaN-NaN
1164+
$('.ui-datepicker').addClass('notranslate');
1165+
11591166
var date_to = $('#room_check_in').val();
11601167
if (typeof date_to != 'undefined' && date_to != '') {
11611168
var date_format = date_to.split("-");

0 commit comments

Comments
 (0)