Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6045289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:06:29+00:00 2026-05-23T07:06:29+00:00

echo $form->input(‘birthday’, array( ‘label’ => ‘Birthday’, ‘type’ => ‘date’, ‘dateFormat’ => ‘MDYMDY’, ‘value’ =>

  • 0
echo $form->input('birthday', array(
    'label' => 'Birthday',
    'type' => 'date',
    'dateFormat' => 'MDYMDY',
    'value' => $bday,
    'empty'=>false,
    'minYear'=>1900,
    'maxYear'=>$max_year-12
));

I have a user, whose birthday is 3/5/81 (m/d/y). It is stored as a unix timestamp. This is what is displayed:

http://img189.imageshack.us/img189/5946/ss20110620040305.png

Notice my code – MDYMDY

If I use only MDY – it displays June 5 1999. However, MDYMDY displays June 5, 1999 and Mar 5, 1981.

Am I missing some random code snippet?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:06:30+00:00Added an answer on May 23, 2026 at 7:06 am

    Remove the dateFormat and type – if your field is datetime, it will automatically output the format you’re hoping for.

    You can also remove empty, since that’s defaulted to false. And lastly, you shouldn’t need to set value – if it’s set up correctly, this will be populated by itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written file form.php in application/classes/form.php <?php defined('SYSPATH') or die('No direct script access.');
I have got a very strange input issue in which it seems that my
I'm trying to make update form, that is going to retrieve the data for
I could use some guidance in how to proceed on form validation in CodeIgniter.
Hi I'm writing and app in PHP. I want to use jquery form validation
Im having some trouble getting on with my first codeigniter project, and i have
EDIT : Removing the 'index.php' with .htaccess creates this probem I just discovered. Now
I cant seem to get CI2's captcha helper to work... Can someone point out
I have installed Modernizr into my code to enable html5 placeholder support in firefox
I have a command that creates a loop: foreach($cart as $line=>$item). When it displays,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.