Sigma Php Ajax framework, Ajax Components, GUI Builder
May 16, 2012, 11:45:39 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Calendar : Date picker not opening  (Read 1412 times)
sgigras
Jr. Member
**
Posts: 6


View Profile
« on: March 01, 2009, 01:08:56 AM »

PHP 5 -  MYSQL - Sigma 2.1
While playing with CRUD example i found that the date picker is not displayed (when clicked on calendar button); The same is happening with my prototype application.

I don't have any clue where and what I should be looking at, to fix this.

Any help appriciated.

Thanks.
Logged
humi
Hero Member
*****
Posts: 284


View Profile
« Reply #1 on: March 01, 2009, 07:58:02 AM »

Is the example you looked at here?
http://www.sigmawidgets.com/products/sigma_grid2/demos/example_column_editor.html

If it is a copy you have uploaded to your server and modified at all: make sure the javascript calls for the calendar functions are located in the HEAD portion of the HTML document, and that the calls are placed before the grid object is created and rendered.

Logged
sgigras
Jr. Member
**
Posts: 6


View Profile
« Reply #2 on: March 02, 2009, 12:47:21 AM »

thanks Humi
 

I have not made any changes to code. Following is the View Source of CRUD example; downloaded from SITE. Are you able to find something missing??

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" -->
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title>Sigma Grid 2.0 CRUD Sample</title>


<link rel="stylesheet" type="text/css" href="../../grid/gt_grid.css" />
<link rel="stylesheet" type="text/css" href="../../grid/skin/vista/skinstyle.css" />
<script type="text/javascript" src="../../grid/gt_msg_en.js"></script>
<script type="text/javascript" src="../../grid/gt_grid_all.js"></script>
<script type="text/javascript" src="../../grid/flashchart/fusioncharts/FusionCharts.js"></script>
<script type="text/javascript" src="../../grid/calendar/calendar.js"></script>

<script type="text/javascript" src="../../grid/calendar/calendar-setup.js"></script>
   
   
<script type="text/javascript" >

var grid_demo_id = "myGrid1";


var dsOption= {

   fields :[
      {name : 'order_no'  },
      {name : 'employee'  },
      {name : 'country'  },
      {name : 'customer'  },
      {name : 'order2005' ,type: 'float' },
      {name : 'order2006' ,type: 'float' },
      {name : 'order2007' ,type: 'float' },
      {name : 'order2008' ,type: 'float' },
      {name : 'delivery_date' ,type:'date'  }
      
   ],
   recordType : 'object'
}

var colsOption = [
     {id: 'order_no' , header: "Order No" , width :60 },
     {id: 'employee' , header: "Employee" , width :80 , editor:{type:'text'}},
      {id: 'country' , header: "Country" , width :70, width :80 , editor : { type :"select" ,options : {'US': 'US' ,'FR':'FR', 'BR':'BR'} ,defaultText : 'US' } },
      {id: 'customer' , header: "Customer" , width :80, width :80 , editor:{type:'text'}},
      {id: 'order2005' , header: "2005" , width :60, width :80 , editor: { type :"text" ,validRule : ['R','F'] }},
      {id: 'order2006' , header: "2006" , width :60, width :80 , editor: { type :"text" ,validRule : ['R','F'] }},
      {id: 'order2007' , header: "2007" , width :60, width :80 , editor: { type :"text" ,validRule : ['R','F'] }},
      {id: 'order2008' , header: "2008" , width :60, width :80 , editor: { type :"text" ,validRule : ['R','F'] }},
      {id: 'delivery_date' , header: "Delivery Date" , width :100, editor: { type :"date" }}
       
];


var gridOption={
   id : grid_demo_id,
   loadURL : 'Controller.php',
   saveURL : 'Controller.php',
   width: "700",  //"100%", // 700,
   height: "200",  //"100%", // 330,
   container : 'gridbox',
   replaceContainer : true,
   encoding : 'UTF-8', // Sigma.$encoding(),
   dataset : dsOption ,
   columns : colsOption ,
   clickStartEdit : true ,
   defaultRecord : {'order_no':"00",'employee':"",'country':"",'customer':"",'order2005':0,'order2006':0,'order2007':0,'order2008':0,'delivery_date':"2008-01-01"},
   pageSize:100,
   toolbarContent : 'reload | add del save | print'
};


var mygrid=new Sigma.Grid( gridOption );
Sigma.Util.onLoad(function(){mygrid.render()});


//////////////////////////////////////////////////////////






</script>
</head>
<body>

<div id="page-container">
   
  <div id="header">
  <h1>
      Product - Sigma Grid</h1>
  </div>

  <div id="content">
   
     <h2>Sigma Grid CRUD Sample</h2>
     
    <div id="bigbox" style="margin:15px;display:!none;">
      <div id="gridbox" style="border:0px solid #cccccc;background-color:#f3f3f3;padding:5px;height:200px;width:700px;" ></div>
    </div>

  </div>
 
 
  <h3>About Sigmasoft</h3>

    <p>
    Sigmasoft Technologies LLC is a software company providing cross-browser javascript GUI components and tools & services involved. Our aim is to make AJAX simple and easy.
<br>Sigmasoft also provides end-to-end solutions in web development (Web 2.0, PHP, ASP.NET, ASP, JSP, XML, Flash), application development and IT consulting services. Please send email to sales@sigmawidgets.com for further infomation.
</p>
  <div id="footer">All contents are (c) Copyright 2005 - 2008, Sigma Software Inc. All rights Reserved</div>
</div>

</body>
</html>
Logged
humi
Hero Member
*****
Posts: 284


View Profile
« Reply #3 on: March 02, 2009, 07:44:31 AM »

I downloaded the example, and tried it. Also tried the CRUD online example. Works for me. Something to try is, move the JavaScript call for the calender before the call for the grid.

Logged
sgigras
Jr. Member
**
Posts: 6


View Profile
« Reply #4 on: March 02, 2009, 02:34:48 PM »

Thanks Humi,

I worked... Thanks a lot.
Logged
kelp
Newbie
*
Posts: 2


View Profile
« Reply #5 on: March 08, 2009, 12:35:22 PM »

Hi all,

I tried as you said but nothing happens not only with my code but with samples as well ... so date picker not openning at all
Can it depend on browser type and version, I used IE7 and Opera. And you?
Logged
humi
Hero Member
*****
Posts: 284


View Profile
« Reply #6 on: March 09, 2009, 08:35:27 AM »

Yes. IE is acts strange with the calendar.
Logged
lifeform
Jr. Member
**
Posts: 12


View Profile
« Reply #7 on: May 04, 2009, 05:48:09 AM »

By inspection of the other demos where the date picker was working, I found that including these extra two files worked:

Quote
<link rel="stylesheet" type="text/css" media="all" href="../../grid/calendar/calendar-blue.css"  />
<script type="text/javascript" src="../../grid/calendar/calendar.js"></script>
<script type="text/javascript" src="../../grid/calendar/calendar-en.js"></script>
<script type="text/javascript" src="../../grid/calendar/calendar-setup.js"></script>

HTH
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!