如何确定给定字符串是否代表日期? [英] How can I determine whether a given string represents a date?

查看:215
本文介绍了如何确定给定字符串是否代表日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery中是否有 isDate 函数?

Is there an isDate function in jQuery?

它应返回 true 如果输入是日期,则 false 否则。

It should return true if the input is a date, and false otherwise.

推荐答案

根据您尝试实现此操作的方式,您可以使用使用 日期 c $ c>选项设置。

Depending on how you're trying to implement this, you may be able to use the "validate" jQuery plugin with the date option set.

这篇关于如何确定给定字符串是否代表日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆