Categories | Question details Back To List | ||
DHTMLX Calendar : Setting Position of caledar object Hi! I have some question. I want Re-Position Calendar Object.So I used setposition method. this method is need to 3 argument. Right? first is object name.sec, left third, top.. but this is not work.. I can't re-Prosition Calender Object. how to do work? ------------------------------------------------------------------- attach source code <HTML> <HEAD> <TITLE> 제일은행 건철관리 </TITLE> <!-- 공통 StyleSheet --> <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxcalendar.css"> <link REL="stylesheet" TYPE="text/css" HREF="../../css/style2.css"> <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxwindows.css"> <link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxcalendar_skins.css"> <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxwindows_clear_silver.css"> <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxwindows_web_userbtn_tray.css"> <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid.css"> <script> window.dhx_globalImgPath="../../codebase/imgs/"; </script> <script src="../../codebase/dhtmlxcommon.js"></script> <script src="../../codebase/dhtmlxcalendar.js"></script> <script src="../../codebase/dhtmlxwindows.js"></script> <script src="../../codebase/dhtmlxgrid.js"></script> <script src="../../codebase/dhtmlxgridcell.js"></script> <script src="../../codebase/ext/dhtmlxgrid_filter.js"></script> <script src="../../js/appDhtmlx/grid_loading.js"></script> <script src="../../js/appDhtmlx/menu.js"></script> <script src="../../js/common/common.js"></script> <style> .ta {border:1px solid #ff0000; border-collapse: collapse; background:#ff0000;} </style> <script> var cal1; var dateFrom = null; var dateTo = null; window.onload = function () { cal1 = new dhtmlxCalendarObject('calInput1'); cal1.setSkin("yahoolike"); cal1.setPosition(cal1,100,100); } </script> <body> <input type="text" id="calInput1" style="width: 200px; font-size:12px;" readonly="true"> </body> </html> --------------------------------------------------------------------------------------------------------------------- Answer posted by Carmine Marino on Jul 30, 2008 03:13 setPosition can be used as calendar.setPosition(x,y); // set calendar to position x,y calendar.setPosition(obj,x,y); // set calendar to position x,y relative to HTML element obj If calendar was attached to input box, it can't be repositioned ( each time when input clicked and calendar opens - it will position self next to master input ) Answer posted on Apr 20, 2009 15:13 This does not really seem to be working. When we try to set the position relative to some object (in our case a calendar icon, so it opens next to the icon) it still is positioned relative to its container object (span tag). Answer posted on Apr 20, 2009 15:13 It would be nice if we could specify the positioning better, also when attaching to an input. Answer posted by Alex (support) on Apr 21, 2009 01:10 When you attach calendar to some object, the calendar appears next to the right border of the object. If you want to set other position, you can define this position directly in the setPosition(left,top) method. |