473,606 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

date picker

I need to add the ability for the users to select a date on one of our
web pages. The examples I was given by some users were in JavaScript.
Is there a free date picker that I can use? I saw one at
http://webfx.eae.net but it does not seem to be free.

Thanks!

Jan 25 '06 #1
9 2243
d
<ne**********@y ahoo.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
I need to add the ability for the users to select a date on one of our
web pages. The examples I was given by some users were in JavaScript.
Is there a free date picker that I can use? I saw one at
http://webfx.eae.net but it does not seem to be free.

Thanks!


There is a really great free one that does exactly what you want - you just
have to write it yourself :)

dave
Jan 25 '06 #2
Message-ID: <11************ **********@o13g 2000cwo.googleg roups.com> from
ne**********@ya hoo.com contained the following:
I need to add the ability for the users to select a date on one of our
web pages. The examples I was given by some users were in JavaScript.
Is there a free date picker that I can use? I saw one at
http://webfx.eae.net but it does not seem to be free.


How about this?

http://www.ckdog.co.uk/test/calendar.php

<?php
session_start() ;
if(isset($_GET['referer'])){
$referer=$_GET['referer'];}
else{
$referer=$_SERV ER['PHP_SELF'];
}
?>

<link rel="stylesheet " href="style.css " type="text/css">
<?php

$today_stamp=mk time(0,0,0,date ("n"),date("j") ,date("Y"));

$today = getdate();
$month = $today['month'];
$mday = $today['mday'];
$year = $today['year'];
if(!isset($_SES SION['m'])){
$_SESSION['m'] =$today['mon'];
}
if(isset($_GET['fwd'])){
$_SESSION['m']=$_SESSION['m']+$_GET['fwd'];}
if(isset($_GET['rev'])){
$_SESSION['m']=$_SESSION['m']-$_GET['rev'];}
$m= $_SESSION['m'];
//echo "<b>Todays date is $month $mday, $year</b><br>";
?>
<html>
<head>
<style>
BODY {
COLOR: #000000;
FONT-FAMILY: Arial, Helvetica, sans-serif;
BACKGROUND-COLOR: #CCFFCC
}
a:link{COLOR: navy;
}
a:visited{COLOR : navy;
}
a:hover{COLOR: navy;color:#990 000;
}
a:active{COLOR: navy;
}
a.cdr:link { text-decoration: none; }
a.cdr:visited { text-decoration: none; }
a.cdr:hover { text-decoration: underline; }
a.cdr:active { text-decoration: none;}
..tblhead { font-family: Arial, Helvetica, sans-serif; font-weight:
bold; text-align: center; float:left;}

..dates {
padding-top:1px;padding-bottom:1px;padd ing-left:3px;paddin g-right:3px;text-align:right;wid th:15px;}
..today { background-color: #FFCCFF;
padding-top:1px;padding-bottom:1px;padd ing-left:3px;paddin g-right:3px;text-align:right;wid th:15px;}

</style>
</head>
<body>
<table border="1" cellspacing="0"
cellpadding="1" style="font-size:80%"width= 20%>
<tr class="tblhead" ><td>
<?php
print "<a class=\"cdr\"
href=\"".$_SERV ER['PHP_SELF']."?rev=1\">&lt; &lt;</a></td>
<td colspan=\"5\">" .date("F y",mktime(0,0,0 ,$m,1,date("Y") ))."</td><td>
<a class=\"cdr\" href=\"".$_SERV ER['PHP_SELF']."?fwd=1\">&gt; &gt;</a>";
?>
</td></tr>
<tr>

<td class="tblhead" >M</td>
<td class="tblhead" >T</td>
<td class="tblhead" >W</td>
<td class="tblhead" >T</td>
<td class="tblhead" >F</td>
<td class="tblhead" >S</td>
<td class="tblhead" >S</td>
</tr>
<?php
$i=1;
$c=0;
//print blank cells at beginning
while(date('w', mktime(0,0,0,$m ,$i,date("Y"))) !=1){
print"<td class=\"dates\" >&nbsp;</td>";
$i--;
$c++;}
$i=1;
//print rest of first week

while($c<7){
$t=mktime(0,0,0 ,$m,$i,date("Y" ));
if($t==$today_s tamp){$dates="t oday";}else{$da tes="dates";}
print"<td class=\"$dates\ "><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</t></td>\n";
$c++;
$i++;}
print"</tr>\n<tr>";

//print rest of month
while(date('j', mktime(0,0,0,$m ,$i,date("Y"))) >1){
$t=mktime(0,0,0 ,$m,$i,date("Y" ));
if($t==$today_s tamp){$dates="t oday";}else{$da tes="dates";}
if($c==7){$c=0; }
if($c<6){
print "<td class=\"$dates\ "><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n";
}
else{print "<td class=\"dates\" ><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n</tr>\n<tr>";}
$i++;
$c++;}
//fill in empty spaces at end
while($c<7){
print"<td class=\"dates\" >&nbsp;</td>";
$c++;}
print"</tr>";
?>
</table>
</body>
</html>
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jan 25 '06 #3
Geoff Berrow wrote:
Message-ID: <11************ **********@o13g 2000cwo.googleg roups.com> from
ne**********@ya hoo.com contained the following:
I need to add the ability for the users to select a date on one of our
web pages. The examples I was given by some users were in JavaScript.
Is there a free date picker that I can use? I saw one at
http://webfx.eae.net but it does not seem to be free.


How about this?

http://www.ckdog.co.uk/test/calendar.php


The display is a bit mangled but it is very nice and just what I was
looking for! Thank you.

Jan 25 '06 #4
Message-ID: <11************ **********@g14g 2000cwa.googleg roups.com> from
ne**********@ya hoo.com contained the following:
http://www.ckdog.co.uk/test/calendar.php


The display is a bit mangled but it is very nice and just what I was
looking for! Thank you.


Yeah, been meaning to fix that. It works fine in IE.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jan 25 '06 #5
ne**********@ya hoo.com wrote:
I need to add the ability for the users to select a date on one of our
web pages. The examples I was given by some users were in JavaScript.
Is there a free date picker that I can use? I saw one at
http://webfx.eae.net but it does not seem to be free.

Thanks!


As an alternative you could have a look at:
http://www.mattkruse.com/javascript/calendarpopup/
Jan 25 '06 #6
Message-ID: <11************ **********@g14g 2000cwa.googleg roups.com> from
ne**********@ya hoo.com contained the following:
How about this?

http://www.ckdog.co.uk/test/calendar.php


The display is a bit mangled but it is very nice and just what I was
looking for! Thank you.

Try this:

<?php
session_start() ;
if(isset($_GET['referer'])){
$referer=$_GET['referer'];}
else{
$referer=$_SERV ER['PHP_SELF'];
}
$today_stamp=mk time(0,0,0,date ("n"),date("j") ,date("Y"));

$today = getdate();
$month = $today['month'];
$mday = $today['mday'];
$year = $today['year'];
if(!isset($_SES SION['m'])){
$_SESSION['m'] =$today['mon'];
}
if(isset($_GET['fwd'])){
$_SESSION['m']=$_SESSION['m']+$_GET['fwd'];}
if(isset($_GET['rev'])){
$_SESSION['m']=$_SESSION['m']-$_GET['rev'];}
$m= $_SESSION['m'];
//echo "<b>Todays date is $month $mday, $year</b><br>";
?>
<html>
<head>
<title>Calendar </title>
<style>
BODY {
COLOR: #000000;
FONT-FAMILY: Arial, Helvetica, sans-serif;
BACKGROUND-COLOR: #CCFFCC
}
a:link{COLOR: navy;}
a:visited{COLOR : navy;}
a:hover{COLOR: navy;color:#990 000;}
a:active{COLOR: navy;}
a.cdr:link {text-decoration: none; }
a.cdr:visited {text-decoration: none; }
a.cdr:hover {text-decoration: underline; }
a.cdr:active {text-decoration: none;}

..tblhead {
font-family: Arial, Helvetica, sans-serif;
font-weight:bold;
text-align: center;
padding-top:1px;
padding-bottom:1px;
padding-left:3px;
padding-right:3px;

width:15px;
}

..dates {
padding-top:1px;
padding-bottom:1px;
padding-left:3px;
padding-right:3px;
text-align:right;
width:15px;
}

..today {
background-color: #FFCCFF;
padding-top:1px;
padding-bottom:1px;
padding-left:3px;
padding-right:3px;
text-align:right;
width:15px;
}

</style>
<body>
<table border="1" cellspacing="0"
cellpadding="1" style="font-size:80%">
<tr class="tblhead" ><td>
<?php
print "<a class=\"cdr\"
href=\"".$_SERV ER['PHP_SELF']."?rev=1\">&lt; &lt;</a></td>
<td colspan=\"5\">" .date("F y",mktime(0,0,0 ,$m,1,date("Y") ))."</td><td>
<a class=\"cdr\" href=\"".$_SERV ER['PHP_SELF']."?fwd=1\">&gt; &gt;</a>";
?>
</td></tr>
<tr>

<td class="tblhead" >M</td>
<td class="tblhead" >T</td>
<td class="tblhead" >W</td>
<td class="tblhead" >T</td>
<td class="tblhead" >F</td>
<td class="tblhead" >S</td>
<td class="tblhead" >S</td>
</tr><tr>
<?php
$i=1;
$c=0;
//print blank cells at beginning
while(date('w', mktime(0,0,0,$m ,$i,date("Y"))) !=1){
print"<td class=\"dates\" >&nbsp;</td>";
$i--;
$c++;}
$i=1;
//print rest of first week

while($c<7){
$t=mktime(0,0,0 ,$m,$i,date("Y" ));
if($t==$today_s tamp){$dates="t oday";}else{$da tes="dates";}
print"<td class=\"$dates\ "><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n";
$c++;
$i++;}
print"</tr>\n<tr>";

//print rest of month
while(date('j', mktime(0,0,0,$m ,$i,date("Y"))) >1){
$t=mktime(0,0,0 ,$m,$i,date("Y" ));
if($t==$today_s tamp){$dates="t oday";}else{$da tes="dates";}
if($c==7){$c=0; }
if($c<6){
print "<td class=\"$dates\ "><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n";
}
else{print "<td class=\"dates\" ><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n</tr>\n<tr>";}
$i++;
$c++;}
//fill in empty spaces at end
while($c<7){
print"<td class=\"dates\" >&nbsp;</td>";
$c++;}
print"</tr>";
?>
</table>
</body>
</html>
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jan 25 '06 #7
Message-ID: <fs************ *************** *****@4ax.com> from Geoff
Berrow contained the following:
The display is a bit mangled but it is very nice and just what I was
looking for! Thank you.

Try this:


or better, this:

<?php
session_start() ;
if(isset($_GET['referer'])){
$referer=$_GET['referer'];}
else{
$referer=$_SERV ER['PHP_SELF'];
}
$today_stamp=mk time(0,0,0,date ("n"),date("j") ,date("Y"));

$today = getdate();
$month = $today['month'];
$mday = $today['mday'];
$year = $today['year'];
if(!isset($_SES SION['m'])){
$_SESSION['m'] =$today['mon'];
}
if(isset($_GET['fwd'])){
$_SESSION['m']=$_SESSION['m']+$_GET['fwd'];}
if(isset($_GET['rev'])){
$_SESSION['m']=$_SESSION['m']-$_GET['rev'];}
$m= $_SESSION['m'];
//echo "<b>Todays date is $month $mday, $year</b><br>";
?>
<html>
<head>
<title>Calendar </title>
<style>
BODY {
COLOR: #000000;
FONT-FAMILY: Arial, Helvetica, sans-serif;
BACKGROUND-COLOR: #CCFFCC
}
a:link{COLOR: navy;}
a:visited{COLOR : navy;}
a:hover{COLOR: navy;color:#990 000;}
a:active{COLOR: navy;}
a.cdr:link {text-decoration: none; }
a.cdr:visited {text-decoration: none; }
a.cdr:hover {text-decoration: underline; }
a.cdr:active {text-decoration: none;}

..tblhead {
font-family: Arial, Helvetica, sans-serif;
font-weight:bold;
text-align: center;
padding-top:1px;
padding-bottom:1px;
padding-left:3px;
padding-right:3px;
}

..dates {
padding-top:1px;
padding-bottom:1px;
padding-left:3px;
padding-right:3px;
text-align:right;

}

..today {
background-color: #FFCCFF;
padding-top:1px;
padding-bottom:1px;
padding-left:3px;
padding-right:3px;
text-align:right;

}

</style>
<body>
<table border="1" cellspacing="0"
cellpadding="1" style="font-size:80%">
<tr class="tblhead" ><td>
<?php
print "<a class=\"cdr\"
href=\"".$_SERV ER['PHP_SELF']."?rev=1\">&lt; &lt;</a></td>
<td colspan=\"5\">" .date("F y",mktime(0,0,0 ,$m,1,date("Y") ))."</td><td>
<a class=\"cdr\" href=\"".$_SERV ER['PHP_SELF']."?fwd=1\">&gt; &gt;</a>";
?>
</td></tr>
<tr>

<td class="tblhead" >M</td>
<td class="tblhead" >T</td>
<td class="tblhead" >W</td>
<td class="tblhead" >T</td>
<td class="tblhead" >F</td>
<td class="tblhead" >S</td>
<td class="tblhead" >S</td>
</tr><tr>
<?php
$i=1;
$c=0;
//print blank cells at beginning
while(date('w', mktime(0,0,0,$m ,$i,date("Y"))) !=1){
print"<td class=\"dates\" >&nbsp;</td>";
$i--;
$c++;}
$i=1;
//print rest of first week

while($c<7){
$t=mktime(0,0,0 ,$m,$i,date("Y" ));
if($t==$today_s tamp){$dates="t oday";}else{$da tes="dates";}
print"<td class=\"$dates\ "><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n";
$c++;
$i++;}
print"</tr>\n<tr>";

//print rest of month
while(date('j', mktime(0,0,0,$m ,$i,date("Y"))) >1){
$t=mktime(0,0,0 ,$m,$i,date("Y" ));
if($t==$today_s tamp){$dates="t oday";}else{$da tes="dates";}
if($c==7){$c=0; }
if($c<6){
print "<td class=\"$dates\ "><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n";
}
else{print "<td class=\"dates\" ><a class=\"cdr\"
href=\"".$refer er."?bookdate=$ t\">".date('j', $t)."</a></td>\n</tr>\n<tr>";}
$i++;
$c++;}
//fill in empty spaces at end
while($c<7){
print"<td class=\"dates\" >&nbsp;</td>";
$c++;}
print"</tr>";
?>
</table>
</body>
</html>
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jan 25 '06 #8
On 24 Jan 2006 19:01:46 -0800, ne**********@ya hoo.com wrote:
I need to add the ability for the users to select a date on one of our
web pages. The examples I was given by some users were in JavaScript.
Do you mean you don't want a Javascript one?
Is there a free date picker that I can use? I saw one at
http://webfx.eae.net but it does not seem to be free.


I use and am happy with:

http://www.dynarch.com/projects/calendar/

(it's a Javascript picker, but so's the example you gave)

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 25 '06 #9
Andy Hassall wrote:
On 24 Jan 2006 19:01:46 -0800, ne**********@ya hoo.com wrote:
I need to add the ability for the users to select a date on one of our
web pages. The examples I was given by some users were in JavaScript.


Do you mean you don't want a Javascript one?

I use and am happy with:

http://www.dynarch.com/projects/calendar/

(it's a Javascript picker, but so's the example you gave)


Well, the look of it was just what was shown to me by the users so I
liked it. I don't know Javascript so I was looking for something,
essentially, copy and paste. It was in Php, which I know a bit. But I
will definitely check out the dynarch one too.

My sincere thanks to all who have helped!

Jan 25 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7093
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an empty database, the date time picker returns error 545. Any attempts to progmatically add new records after the empty database has been opened returns, or to use the DTP and set a new date for those added records, "Field not updateable, Bound...
13
3845
by: Hussein Patwa | last post by:
Hi there. I'm new to this group. I'm also partially sighted so navigating the web is sometimes quite difficult. I'm looking for a javascript date picker, you know the ones that travel sites use for selecting the departure and arrival dates. I've had a look at some sites, but mostly found calendars. I want to make mys tie accessible, so I really want the three scroll boxes for the day, month and year.
26
4228
by: sgershon | last post by:
Hi. I know this is should be a simple question. I know server-side web-programming, and never needed to use client-side scripting... until now :) I have done so far a little number of scripts that work well. But there are two that I am having special difficulties with: 1)
13
3081
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. This is the old problem of US date format mm/dd/yy versus dd/mm/yy. I am stepping through the code and the dates do seem to be ok but when the report runs I get records earlier than 1st October which is not what I want.
4
18948
by: Rethish | last post by:
Hi All, I am developing an application in VB.net. I am using .Net Datetime picker control to manage the date. But I am not able to assign null/Empty value to the control. I found the property "Checked" to work with this control..But I cannot use this property for making null dates.. Is there any way to solve this problem?. Expecting any help or suggestions? Regards,
4
2663
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that when the time is saved to the sql database into a datetime field it uses the default date which is a problem when I try to sort, what I wanted to know is there a way for me to set the date in the time picker to the date in the date picker? Any help greatly appreciated.
4
4866
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker control and a textbox control select the validating event of the control and add this code
0
2834
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the date and time picker control, the result of the control's value is always 12:00:00 am instead of the date i selected even though the date displays correctly on the date and time picker control. the controls are unbound. why is this? i also have another identical form where the date and...
1
3166
by: vp.softverm | last post by:
hi all . Am facing problem with the date picker. when i click on date picker in a popup window. the date table is opened in the middle of the pop up window. and it is unable to scroll with the pop up window .
1
6926
by: Bobby | last post by:
Hi, I'm using Office 2007. I have a text field called txtDate which is formatted to medium date. This gives me the date picker when the control has the focus. I have several other text controls whose values change depending on the value in txtDate. If I type in the date in txtDate and press enter, all of the other controls change as expected. However, if I use the date picker to
0
8009
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7939
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8432
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8428
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8078
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6753
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5456
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3919
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.