"> Date format in HTML form should be "mm/yy"-PHP Chinese Network Q&A
Date format in HTML form should be "mm/yy"
P粉990008428
P粉990008428 2023-09-01 11:00:27
0
1
526

I want to create an HTML page containing a form, where one cell should be a date in the format 'mm/yy', with the minimum value being the current month (similar to a credit card expiration date).

What should I do? I didn't find an option to use a date/month type, is there a better option than using text that matches a regex?

P粉990008428
P粉990008428

reply all (1)
P粉521748211

I recommend using the "date" type. It has a lot of features built into it. You can also set minimum and maximum values. You can find more information here:https://developer.mozilla.org/ru/docs/Web/HTML/Element/Input/date

Example:

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!