Thread Rating:
  • 442 Vote(s) - 2.86 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting a value to DateField by keyboard
09-27-2011, 02:15 PM,
#1
Setting a value to DateField by keyboard
Hi,

I used DateField as below, the date format is YYYYMMDD

Users want input the value by keyboard as displaying format, this is impossibe because DateField allows text with only DD/MM/YYYY format

How can other format that we wish be allowed?

Code:
{DateField
    value = {DateTime.date},
    format-spec =
        {proc {dt:DateTime, df:DateField}:String
            {return
                
                {format "%4d%02d%02d",
                    dt.info.year, dt.info.month, dt.info.day
                }
            }
        }
}







Messages In This Thread
Setting a value to DateField by keyboard - by alchimiste - 09-27-2011, 02:15 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  DateField の ValueFinished の抑制 umemura 1 2,597 01-24-2013, 08:10 PM
Last Post: umemura
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('286')