WordPress是否在Admin中提供本机Datepicker? [英] Does Wordpress Provide Native Datepicker in Admin?

查看:77
本文介绍了WordPress是否在Admin中提供本机Datepicker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个插件,并在admin中提供一个由用户填写日期的字段.我想知道WP Admin I中是否有可用的本机datepicker.

I am developing a plugin and in the admin where I provide a field that is filled in by users with a date. I am wondering if there is a native datepicker in the WP Admin I that is available.

我通常会提供一个小型的jQuery datepicker脚本来执行此操作,但是如果已有的话,我会出于明显的原因(例如代码更简洁,UI一致性等)而宁愿这样做.这似乎应该/应该包含在内,但我我们无法找到有关Admin中可用的jQuery内容(如果有)的此类文档.

I usually include a small jQuery datepicker script that does it, but if one is already available I would prefer that for obvious reasons like lighter code, UI consistency, etc. This seems like something that would/should be included but I've not been able to find such documentation on what jQuery stuff, if any, are available in the Admin.

推荐答案

是. WordPress将此包含在核心中.这是有关它的几篇文章:

Yes. Wordpress includes this in the core. Here are a couple articles about it:

WP Codex:功能参考/wp入队脚本

Paul Underwood的虹膜拾色器教程(相同的原理适用于日期选择器)

Paul Underwood's Iris Color Picker Tutorial (same principles apply to datepicker)

这篇关于WordPress是否在Admin中提供本机Datepicker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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