![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 56 Pomógł: 0 Dołączył: 13.07.2011 Skąd: Lublin Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Męczę się z jednym skryptem i nie mam pojęcia czego to mi nie wychodzi: Chce pokazywać zablokować komunikatem stronę następną jak ktoś chce wyszukać połączeń na dzień jutrzejszy: Użytkownik może do godziny 15:00 wyszukiwać połączeń na następny dzień: Kod var new_datetime = new Date(); var new_date2 = new Date(); new_date2.setDate(new_date2.getDate()+1); var hours = new_date2.getHours(); var time_day=true; //alert(hours); var next_day=new_date2.getDate(); var next_month=new_date2.getMonth()+1; var next_year=new_date2.getFullYear(); //---------------------------------- var curr_date = new Date(date_current); var curr_day=curr_date.getDate(); var curr_month=curr_date.getMonth()+1; var curr_year=curr_date.getFullYear(); //------------------------------------ var str1 = curr_month+' '+curr_day+', '+curr_year+' '+hours+':00:00'; var str = next_month+' '+next_day+', '+next_year+' 15:00:00'; var next_curr = new Date(str1); var next_tomorrow = new Date(str); if ( next_curr <= next_tomorrow){ $(function() { $( "#dialog-modal2" ).dialog({ height: 180, modal: true }); }); return false; } } Daty porównuje nie biorąc pod uwagę godzin .... Czego tak jest ? |
|
|
![]() ![]() |
![]() |
Aktualny czas: 7.10.2025 - 11:30 |