• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input date


I am trying to create an input form for date how to do so?

I prefer using animative date like you just need to click the date number and choose the year in order to input the date.  How to do so ?

PHP Code:

title>Blog Form</title>


h1>BLOG FORM</h1>

php $this->load->helper('form'); ?> 

<?php echo validation_errors(); ?>

<?php echo form_open('form'); ?>


<td>Date  :</td>
<td><input type="text" name="username" value="" size="50" /></td>
<td>Upload  :<br><br></td>
<td><input type="text" name="username" value="" size="50" /></td>
<td>Title :</td>
<td><input type="text" name="username" value="" size="50" /></td>
<td>Content :</td>
<textarea rows="8" cols="50">


<div><input type="submit" value="Submit" /></div>


" If I looks more intelligence please increase my reputation."

PHP Code:
$today date("F j, Y, g:i a");                 // March 10, 2001, 5:16 pm
$today date("m.d.y");                         // 03.10.01
$today date("j, n, Y");                       // 10, 3, 2001
$today date("Ymd");                           // 20010310
$today date('h-i-s, j-m-y, it is w Day');     // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
$today date('\i\t \i\s \t\h\e jS \d\a\y.');   // it is the 10th day.
$today date("D M j G:i:s T Y");               // Sat Mar 10 17:16:18 MST 2001
$today date('H:m:s \m \i\s\ \m\o\n\t\h');     // 17:03:18 m is month
$today date("H:i:s");                         // 17:16:18
$today date("Y-m-d H:i:s");                   // 2001-03-10 17:16:18 (the MySQL DATETIME format) 
Just add it to your database date field.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

You can use a date input, but support is browser-dependent (see http://html5doctor.com/the-woes-of-date-input/ ).

The alternative is to use a JavaScript plugin to generate the datepicker. An older article on doing this (which also covers using the plugin as a fallback if the native datepicker is not supported) can be found here: https://www.tjvantoll.com/2012/06/30/cre...jquery-ui/

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.