PHP Classes

CSS disappears

Recommend this page to a friend!

      Active Calendar  >  All threads  >  CSS disappears  >  (Un) Subscribe thread alerts  
Subject:CSS disappears
Summary:when using the Date Picker button
Messages:1
Author:Daniel
Date:2014-04-03 20:22:04
 

  1. CSS disappears   Reply   Report abuse  
Picture of Daniel Daniel - 2014-04-03 20:22:05
Hi Giorgos,

I found your Active Calendar package and I love it, simple, efficient and light-weight.

I have one problem though - when using CSS to format the calendar together with the date picker you lose the CSS info in the GET when clicking the button. I checked the source of the page and the info is in the form's action:
<form name="datepickerform" class="datepickerform" action="/snapshots/detailDate.php?css=css/udden.css" method="get">

However, when clicking the button the URL that I get looks like this:
localhost/snapshots/detailDate.php? ...
no css info.

I took the liberty of modifying my source code to 'fix' it but I am not sure what I have broken, or what more needs to be fixed.

Here are the modifications I made that seems to work, so far.
- Added a private variable: var $cssFile="default.css";
- Modified the public method enableDatePicker:
function enableDatePicker($startYear=false,$endYear=false,$link=false,$button=false,$css=false){

and
if ($css) $this->cssFile=$css;

- Modified the private method mkDatePicker by adding the following line inside the form:
$out.="<input type=\"hidden\" name=\"css\" value=\"".$this->cssFile."\"></input>\n";


Hopefully this can help to improve a very good package.

Daniel