DHTMLX Scheduler Data From Google Calendar

365 views Asked by At

Current scheduler working with google calendar. But not mobile friendly.

<!DOCTYPE html>
<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title></title>
    </head>
    <script src="./codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" href="./codebase/dhtmlxscheduler.css" type="text/css" media="screen" title="no title" charset="utf-8">
        <style type="text/css" media="screen">
    html, body{
        margin:0px;
        padding:0px;
        height:100%;
        overflow:hidden;
    }   
</style>
        <script type="text/javascript" charset="utf-8">
    function init() {
        scheduler.config.xml_date="%Y-%m-%d %H:%i";
        scheduler.init('scheduler_here',new Date(2013, 7, 5),"week");
        scheduler.load("./data.php", "json");

        var dp =  new dataProcessor("./data.php");
        dp.init(scheduler);

        dp.setTransactionMode("POST", false);
    }
</script>
        <body onload="init();">
            <div id="scheduler_here"></div>
        </div>
    </body>

Current Scheduler that is mobile friendly but won't get events from google calendar.

  <!DOCTYPE html>
  <html>

  <head>
    <meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0,     user-scalable = no">
    <script src="cal/webix.js" type="text/javascript"></script>
    <script src="cal/scheduler/scheduler.js" type="text/javascript">    </script>
    <link rel="stylesheet" type="text/css" href="cal/skins/touch.css">
    <link rel="stylesheet" type="text/css"     href="cal/scheduler/scheduler.css">
    <title></title>
    <script type="text/javascript" charset="utf-8">
    webix.ready(function() {
        scheduler.config.hour_date = "%g:%i%a"; 
        scheduler.config.readonly = true;
        webix.ui.fullScreen();
        webix.ui({
            view: "scheduler",
            id: "scheduler"
        });
        $$("scheduler").load("data.json", "json");
    });
    </script>
  </head>
<body>
    <div id="scheduler"></div>
  </body>
</html>

Can't seem to figure out how to merge them or create a new code that has the css to be mobile friendly but still get data from a google calendar.

1

There are 1 answers

0
Aquatic On

In case of json data source, both desktop and mobile scheduler must be able to share the same data source, so code like next must work

$$("scheduler").load("data.php", "json");