last day (15 days later) » 

11:54
1
A: Displaying error message if selected time is in between the time range given in dropdown using jquery

Jithin Raj P RTry this I think this will work. But you will have to use jQuery. I have used bootstrap date picker in it but I think it will just work fine with your plugin as well.cheers..! JsFiddle

Its not working if i select tomorrows date in your code only
I have slected timings 4-7 also its working it should not work
If i select tomorrows date and select any timing it should work right but it is displaying pop up as slot not available
@user8001297 i have fixed the bug please do check it
can't the time format be changed to 12 hours
I need to display n invoice as delivery time- 10-12 in this format but now it is displaying as 18 in this format need to display in am and pm
@user8001297 you do one thing 'you display the text in the option' in invoice, i know this may come to this that's why I asked you before regarding the option value
you can $("#delivery-hours option:selected").text(); to get the text
Which text i need to display in the invoice we need to display as delivery time:10Am-1PM in this format if not how can the owner know the timing
where i need to add this text
Not getting you what you are saying
11:55
how are you displaying the delivery time now in invoice?
using jquery.?
Delivery Date: July 12, 2017 | 18
now it is getting like this
can you send me the link of the site?
or the HTML of `
Delivery Date: July 12, 2017 | 18`
but i need to get that in this format Delivery Date: July 13, 2017 | 10am-1pm
$cart_arr = array();

if ( isset( $date_disp ) ) {
if ( !empty( $hour_disp ) )
$cart_arr[ 'delivery_date' ] = $date_disp .' | '. $hour_disp ;
else
$cart_arr[ 'delivery_date' ] = $date_disp ;
}

if ( isset( $hidden_date ) ) {
if ( !empty( $hour_disp ) )
$cart_arr[ 'delivery_hidden_date' ] = $hidden_date .' | '. $hour_disp ;
else
$cart_arr[ 'delivery_hidden_date' ] = $hidden_date ;

}

$cart_item_meta[ 'prdd_lite_delivery' ][] = $cart_arr;

return $cart_item_meta;

}
this is the code how i am displaying date and time
k let me check
wher are you setting the varable ' $hour_disp'
delievry time: $hour_disp = $_POST[ 'delivery_hour' ];
function prdd_lite_add_cart_item_data( $cart_item_meta, $product_id ){

global $wpdb;

$duplicate_of = $this->prdd_lite_get_product_id( $product_id );

if ( isset( $_POST[ 'delivery_calender_lite' ] ) ) {

$date_disp = $_POST[ 'delivery_calender_lite' ];
$hour_disp = $_POST[ 'delivery_hour' ];

}
12:02
am not that much expert in wp or Php
Just i need to change the time to in this format
it should show as Delivery Date: July 13, 2017 | 10am-1pm in this format
however date is working fine
time is not working
but now you are getting the value of '$('#delivery-hours').val()' as $_POST[ 'delivery_hour' ];
what am saying is that you should get $("#delivery-hours option:selected").text() as $_POST[ 'delivery_hour' ];
i mean it is displaying as Delivery Date: July 12, 2017 | 18 in this format
thats all
i got it man
i need to get in that format which i posted earlier
12:05
let me see if there is a string converter in php
$time_in_12_hour_format = date("g:i a", strtotime($hour_disp));
try this
where i need to add this
12:30
hi
i have cahnged the fiddle
just replce my js
and also
change your select box
to the old one
you there.?

  last day (15 days later) »