help scheduler

hi

I have a problem with is that I have a calendar function to enter data manually, but does not serve me and throws me DataConnector errors and not to do.

function in my page that you draw schedule:

function init() {

	scheduler.config.xml_date="%Y-%m-%d %H:%i";

	scheduler.config.lightbox.sections=[	

		{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},

		{name:"time", height:72, type:"time", map_to:"auto"}

	]

	scheduler.config.first_hour=4;

	scheduler.config.details_on_create=true;

	scheduler.config.details_on_dblclick=true;



	scheduler.init('scheduler_here',null,"month");

	scheduler.load("events.php?uid="+scheduler.uid());

	

	var dp = new dataProcessor("events.php");

	dp.init(scheduler);

}

scheduler.attachEvent("onBeforeLightbox",function(id){
var ev = this.getEvent(id);
var date = ev.start_date;
return (date.getDay()&&date.getDay()!=6)
});

and the function of my page events.php is this and do not insert anything in the database

<?php include ('../componentes/codebase/connector/scheduler_connector.php'); include_once('../componentes/codebase/connector/db_postgre.php'); require_once("../componentes/comunicacion.inc"); global $DB_SERVER,$DB_PORT,$DB_NAME,$DB_USER,$DB_PASSWORD; $res = pg_connect("host=$DB_SERVER port=$DB_PORT dbname=$DB_NAME user=$DB_USER password=$DB_PASSWORD"); function insercion($action){ $status = $action->get_status(); $id_evento = $action->get_value("id_evento"); $start_date = $action->get_value("start_date"); $end_date = $action->get_value("end_date"); $evento_nombre = $action->get_value("evento_nombre"); $detalles = $action->get_value("detalles"); if ($status == "inserted"){ //$action->set_status("deleted"); $scheduler->sql->query("insert","INSERT INTO eventos(id_evento,start_date,end_date,evento_nombre,detalles) VALUES ('{id_evento}','{start_date}','{end_date}','{evento_nombre}','{detalles}')"); $action->success(); } } $scheduler = new schedulerConnector($res,"Postgre"); $scheduler->event->attach("afterProcessing","insercion"); $scheduler->render_table("eventos","id_evento","start_date,end_date,evento_nombre,detalles"); ?>

thank you for your time

I’m not sure , which format uses PostrgreSQL for dates, be sure that

scheduler.config.xml_date="%Y-%m-%d %H:%i";

represents default PGSQL date format.

If problem still occurs - try to add
$scheduler->enable_log(“some.txt”);
and provide content of log file for problematic operatons.

thank you very much for your response

the format is postgresql timestamp '2001-09-28 01:00 ’

the question is to enable the log should I give the full path of the file where you are saving?

And to save event data is created as

Thank you very much for your help and time

In such case you are using correct date format for the scheduler.

the question is to enable the log should I give the full path of the file where you are saving?

You can provide just a file name - it will be saved in same file where events.php is stored ( be sure that enable_log placed before render_table command and target folder have write permission )

Also you are using afterProcessing event, but if you want to replace default insert you need to use beforeProcessing