date picker

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • newtophp2000@yahoo.com

    #1

    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!

  • d

    #2
    Re: date picker

    <newtophp2000@y ahoo.com> wrote in message
    news:1138158106 .184639.196080@ o13g2000cwo.goo glegroups.com.. .[color=blue]
    >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!
    >[/color]

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

    dave


    Comment

    • Geoff Berrow

      #3
      Re: date picker

      Message-ID: <1138158106.184 639.196080@o13g 2000cwo.googleg roups.com> from
      newtophp2000@ya hoo.com contained the following:
      [color=blue]
      >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.[/color]

      How about this?





      <?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/

      Comment

      • newtophp2000@yahoo.com

        #4
        Re: date picker

        Geoff Berrow wrote:[color=blue]
        > Message-ID: <1138158106.184 639.196080@o13g 2000cwo.googleg roups.com> from
        > newtophp2000@ya hoo.com contained the following:
        >[color=green]
        > >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.[/color]
        >
        > How about this?
        >
        > http://www.ckdog.co.uk/test/calendar.php
        >[/color]

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

        Comment

        • Geoff Berrow

          #5
          Re: date picker

          Message-ID: <1138204327.022 439.221600@g14g 2000cwa.googleg roups.com> from
          newtophp2000@ya hoo.com contained the following:
          [color=blue][color=green]
          >> http://www.ckdog.co.uk/test/calendar.php
          >>[/color]
          >
          >The display is a bit mangled but it is very nice and just what I was
          >looking for! Thank you.[/color]

          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/

          Comment

          • Juliette

            #6
            Re: date picker

            newtophp2000@ya hoo.com wrote:[color=blue]
            > 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!
            >[/color]

            As an alternative you could have a look at:

            Comment

            • Geoff Berrow

              #7
              Re: date picker

              Message-ID: <1138204327.022 439.221600@g14g 2000cwa.googleg roups.com> from
              newtophp2000@ya hoo.com contained the following:
              [color=blue][color=green]
              >> How about this?
              >>
              >> http://www.ckdog.co.uk/test/calendar.php
              >>[/color]
              >
              >The display is a bit mangled but it is very nice and just what I was
              >looking for! Thank you.[/color]
              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/

              Comment

              • Geoff Berrow

                #8
                Re: date picker

                Message-ID: <fshft19i4v04de 4hkl5nacf4fcdle pne63@4ax.com> from Geoff
                Berrow contained the following:
                [color=blue][color=green]
                >>The display is a bit mangled but it is very nice and just what I was
                >>looking for! Thank you.[/color]
                >Try this:[/color]

                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/

                Comment

                • Andy Hassall

                  #9
                  Re: date picker

                  On 24 Jan 2006 19:01:46 -0800, newtophp2000@ya hoo.com wrote:
                  [color=blue]
                  >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.[/color]

                  Do you mean you don't want a Javascript one?
                  [color=blue]
                  >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.[/color]

                  I use and am happy with:



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

                  --
                  Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
                  http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

                  Comment

                  • newtophp2000@yahoo.com

                    #10
                    Re: date picker

                    Andy Hassall wrote:[color=blue]
                    > On 24 Jan 2006 19:01:46 -0800, newtophp2000@ya hoo.com wrote:
                    >[color=green]
                    > >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.[/color]
                    >
                    > 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)[/color]

                    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!

                    Comment

                    Working...