佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1082|回复: 5

请问有谁用过jQuery Datepicker?

[复制链接]
发表于 6-12-2012 12:08 PM | 显示全部楼层 |阅读模式
如题, http://keith-wood.name/datepick.html 。 如果我要把显示的日期改为价钱表,行吗?谢谢了。

回复

使用道具 举报


ADVERTISEMENT

发表于 7-12-2012 06:59 PM | 显示全部楼层
改js file 不就行了吗?
回复

使用道具 举报

发表于 8-12-2012 01:10 PM | 显示全部楼层
你要的是不是当user click 那个Input box的时候。。
它就好像那个datepicker一样list出所有price lists?

回复

使用道具 举报

 楼主| 发表于 8-12-2012 03:19 PM | 显示全部楼层
路人1 发表于 8-12-2012 01:10 PM
你要的是不是当user click 那个Input box的时候。。
它就好像那个datepicker一样list出所有price lists?
...

对了。在日期上面显示价钱。用处:譬如酒店的价格依照假期浮动。
回复

使用道具 举报

发表于 8-12-2012 11:40 PM | 显示全部楼层
好像那个 http://flynXw.my 的Calendar Mode ??X

好像楼上讲的 (code 几鬼长2下):
http://code.jquery.com/ui/1.9.2/jquery-ui.js

这个比较短, 应该是该这个html:
http://calendarview.org/releases/1.2/javascripts/calendarview.js
  1. //----------------------------------------------------------------------------
  2.   // Create/Draw the Calendar HTML Elements
  3.   //----------------------------------------------------------------------------

  4.   create: function(parent)
  5.   {

  6.     // If no parent was specified, assume that we are creating a popup calendar.
  7.     if (!parent) {
  8.       parent = document.getElementsByTagName('body')[0]
  9.       this.isPopup = true
  10.     } else {
  11.       this.isPopup = false
  12.     }

  13.     // Calendar Table
  14.     var table = new Element('table')

  15.     // Calendar Header
  16.     var thead = new Element('thead')
  17.     table.appendChild(thead)

  18.     // Title Placeholder
  19.     var row  = new Element('tr')
  20.     var cell = new Element('td', { colSpan: 7 } )
  21.     cell.addClassName('title')
  22.     row.appendChild(cell)
  23.     thead.appendChild(row)

  24.     // Calendar Navigation
  25.     row = new Element('tr')
  26.     this._drawButtonCell(row, '«', 1, Calendar.NAV_PREVIOUS_YEAR)
  27.     this._drawButtonCell(row, '‹', 1, Calendar.NAV_PREVIOUS_MONTH)
  28.     this._drawButtonCell(row, 'Today',    3, Calendar.NAV_TODAY)
  29.     this._drawButtonCell(row, '›', 1, Calendar.NAV_NEXT_MONTH)
  30.     this._drawButtonCell(row, '»', 1, Calendar.NAV_NEXT_YEAR)
  31.     thead.appendChild(row)

  32.     // Day Names
  33.     row = new Element('tr')
  34.     for (var i = 0; i < 7; ++i) {
  35.       cell = new Element('th').update(Calendar.SHORT_DAY_NAMES[i])
  36.       if (i == 0 || i == 6)
  37.         cell.addClassName('weekend')
  38.       row.appendChild(cell)
  39.     }
  40.     thead.appendChild(row)

  41.     // Calendar Days
  42.     var tbody = table.appendChild(new Element('tbody'))
  43.     for (i = 6; i > 0; --i) {
  44.       row = tbody.appendChild(new Element('tr'))
  45.       row.addClassName('days')
  46.       for (var j = 7; j > 0; --j) {
  47.         cell = row.appendChild(new Element('td'))
  48.         cell.calendar = this
  49.       }
  50.     }

  51.     // Calendar Container (div)
  52.     this.container = new Element('div')
  53.     this.container.addClassName('calendar')
  54.     if (this.isPopup) {
  55.       this.container.setStyle({ position: 'absolute', display: 'none' })
  56.       this.container.addClassName('popup')
  57.     }
  58.     this.container.appendChild(table)

  59.     // Initialize Calendar
  60.     this.update(this.date)

  61.     // Observe the container for mousedown events
  62.     Event.observe(this.container, 'mousedown', Calendar.handleMouseDownEvent)

  63.     // Append to parent element
  64.     parent.appendChild(this.container)

  65.   },

  66.   _drawButtonCell: function(parent, text, colSpan, navAction)
  67.   {
  68.     var cell          = new Element('td')
  69.     if (colSpan > 1) cell.colSpan = colSpan
  70.     cell.className    = 'button'
  71.     cell.calendar     = this
  72.     cell.navAction    = navAction
  73.     cell.innerHTML    = text
  74.     cell.unselectable = 'on' // IE
  75.     parent.appendChild(cell)
  76.     return cell
  77.   },
复制代码
回复

使用道具 举报

 楼主| 发表于 10-12-2012 04:00 PM | 显示全部楼层
gkheng2003 发表于 8-12-2012 11:40 PM
好像那个 http://flynXw.my 的Calendar Mode ??X

好像楼上讲的 (code 几鬼长2下):

谢谢了,正在研究coding中。
回复

使用道具 举报

Follow Us
您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 7-10-2025 02:10 PM , Processed in 0.116289 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表