日期时间选择框jquery dynDateTime精减版

  先介绍下dynDateTime:

  jquery的dynDateTime插件可以方便地在网页上插入日期时间输入框(input).使用方法非常简单,在加载其源文件后,只需要一行代码:

$("input.dateField").dynDateTime();

就可以把所有class=dateField的input输入框变为日期时间选择框。

相关链接:

google code:http://code.google.com/p/dyndatetime/

examples:http://www.mechanicalmarksy.com/hosted/toolman/dyndatetime/example.html

详细使用方法介绍:http://code.google.com/p/dyndatetime/wiki/Home

下面是最简单的示例:

<!-- main jQuery code –>
<mce:script type="text/javascript" src="jquery-xxx.js" mce_src="jquery-xxx.js"></mce:script>
<!  plugin code -->
<script src="dynDateTime/jquery.dynDateTime.js" type="text/javascript"><!--mce:0--></script>
<!-- Language specific file for calendar -->
<script src="dynDateTime/lang/calendar-en.js" type="text/javascript"><!--mce:1--></script>
<!-- include one of the CSS styles, or make your own -->

在网页中加入input:

<input class=”dateField” />

调用

jQuery(“input.dateField”).dynDateTime();

 

 

我改的精减版:下载

只保留使用必须的一个dynDateTime,一种语言(中文),一个样式;(从GOOGLE CODE中下载的源码有近十种样式,几十种语言支持,其中也有中文,但不能用 囧)。语言文件现在是GBK的,如果需要请自己转为UTF-8。

补充一点:

http://code.google.com/p/dyndatetime/wiki/Home 链接里面的介绍有个错误的地方

jQuery( “input.dateField” ).dynDateTime(
  showsTime
: true,
  ifFormat
: “%Y/%m/%d-%H:%M”,
  button
: “.next()” //next sibling to input field
);

请改为

jQuery( “input.dateField” ).dynDateTime({
  showsTime
: true,
  ifFormat
: “%Y/%m/%d-%H:%M”,
  button
: “.next()” //next sibling to input field
}

);


( ! ) Warning: Missing argument 1 for cwppos_show_review(), called in /data/www/enjoyphp/wp-content/themes/flat/content-single.php on line 29 and defined in /data/www/enjoyphp/wp-content/plugins/wp-product-review/includes/legacy.php on line 18
Call Stack
#TimeMemoryFunctionLocation
10.0000355192{main}( ).../index.php:0
20.0001355480require( '/data/www/enjoyphp/wp-blog-header.php' ).../index.php:17
30.184610159720require_once( '/data/www/enjoyphp/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.186010230864include( '/data/www/enjoyphp/wp-content/themes/flat/single.php' ).../template-loader.php:74
50.285810796984get_template_part( ).../single.php:5
60.285810797504locate_template( ).../general-template.php:167
70.285810797600load_template( ).../template.php:643
80.285910797984require( '/data/www/enjoyphp/wp-content/themes/flat/content-single.php' ).../template.php:686
90.298910783096cwppos_show_review( ).../content-single.php:29

发表评论

电子邮件地址不会被公开。 必填项已用*标注