Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Check date input

LEGEND ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

A user can enter a date into a form field. The date will be inserted
into a database. The input has to be as yyyy-mm-dd.

How can I control the input and display an error message if the user
enters dd.mm.yyyy?

Martin
TOPICS
Server side applications

Views

330
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

i'd use separate fields for year, month, day. then just concatenate them
before inserting in the DB

using list/menu fields you also simplify the validation

Martin Lang wrote:
> A user can enter a date into a form field. The date will be inserted
> into a database. The input has to be as yyyy-mm-dd.
>
> How can I control the input and display an error message if the user
> enters dd.mm.yyyy?
>
> Martin

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

John Doe schrieb:
> i'd use separate fields for year, month, day. then just concatenate them
> before inserting in the DB

Good idea - thank you!

Martin

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

Or use a javascript Datepicker - there are plenty of decent free ones on the
web and most have Date formatting options.


"Martin Lang" <mart@nospam.net> wrote in message
news:egm6sn$e3i$1@forums.macromedia.com...
> John Doe schrieb:
>> i'd use separate fields for year, month, day. then just concatenate them
>> before inserting in the DB
>
> Good idea - thank you!
>
> Martin


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

LATEST
> Or use a javascript Datepicker - there are plenty of decent free ones on the
> web and most have Date formatting options.

I thought about and downloaded a datepicker from blueshoes.
Thank you!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines