phpScheduleIt
May 23, 2013, 10:19:34 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Overnight schedules!  (Read 583 times)
harrung
Newbie
*

Karma: 0
Posts: 4


« on: February 15, 2012, 05:58:47 AM »

Hi there,

I´m still trying to create a schedule from 21:00 - 07:00 and get the error message "Start time/End Time.......)

I also tried to fix t by doing this workaround (comment out line 192 - 193 of functions.js). Didn´t work.

In the online demo of version 2.0 is the same problem.

I could need some help :-))

THX
harrung
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: February 15, 2012, 12:19:47 PM »

You need to pick the next day
Logged
harrung
Newbie
*

Karma: 0
Posts: 4


« Reply #2 on: February 16, 2012, 07:45:14 AM »

You mean when I´m creating a reservation, right? I´m already doing that way, just wanted to know if there is another way. So I´ve to display from 00:00 - 24:00. But I only need from 21:00 - 07:00

But it´s OK. Great work you did...

harrung
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #3 on: February 16, 2012, 03:29:03 PM »

Oh, you want the actual hours of the schedule to be 21-7? Hmm, that's an interesting question. I could tell you how to do it in 2.0, but that won't help Smiley

My best suggestion would be to change the javascript to not validate the start/end times when saving the schedule and see what happens.
Logged
harrung
Newbie
*

Karma: 0
Posts: 4


« Reply #4 on: February 17, 2012, 02:28:30 AM »

Hi Nick,

if there´s 2.0 available in German I´d make an upgrade...

But what do I´ve to change exactly? Which part of your javascript do I´ve to change? in 1.2.12?

You must know, I´m a noob in programming, but I can change codes, if somebody is saying what to change.
Do I´ve to restart my webserver?

Best regards
harrung
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #5 on: February 21, 2012, 12:55:58 PM »

There is a file called functions.js. In there you'll find the following code:
Code:
function checkAddSchedule() {
var f = document.addSchedule;
var msg = "";

if (f.scheduletitle.value=="")
msg+="-Schedule title is required.\n";
if (parseInt(f.daystart.value) > parseInt(f.dayend.value))
msg+="-Invalid start/end times.\n";
if (f.viewdays.value == "" || parseInt(f.viewdays.value) <= 0)
msg+="Invalid view days.\n";
if (f.adminemail.value == "")
msg+="Admin email is required.\n";

if (msg!="") {
alert("You have the following errors:\n\n"+msg);
return false;
}

return true;
}

Change it to this:
Code:
function checkAddSchedule() {
var f = document.addSchedule;
var msg = "";

if (f.scheduletitle.value=="")
msg+="-Schedule title is required.\n";
if (f.viewdays.value == "" || parseInt(f.viewdays.value) <= 0)
msg+="Invalid view days.\n";
if (f.adminemail.value == "")
msg+="Admin email is required.\n";

if (msg!="") {
alert("You have the following errors:\n\n"+msg);
return false;
}

return true;
}

No restart or anything is necessary. Just refresh the page in your browser.
Logged
harrung
Newbie
*

Karma: 0
Posts: 4


« Reply #6 on: February 22, 2012, 10:46:35 AM »

Hi Nick,

thanks for your reply... Unfortunately it didn´t work. I still get the error message "Invalid start/end times" where does he take the error message from? I replaced the code you gave to me... Without the time check.... But no effect. Did you try it on your own? Maybe you could send me the whole file or you post the code, so that I can paste in my functions.js

Thank you and best regards
harrung

EDIT: After I made your changes, I was not able to create a resaervation from 22:00 - 07:00! Reservations can only made with the "old" settings, means time check enabled..
« Last Edit: February 24, 2012, 05:00:45 AM by harrung » Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #7 on: February 27, 2012, 01:30:04 PM »

The change to this file made it impossible to create a reservation?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!