简体   繁体   English

Joomla日历定制

[英]Joomla Calendar customization

I am trying to create a booking system. 我正在尝试创建一个预订系统。 How do I show the selected date in 2 select boxes instead of an input which is the default in Joomla as in the image below? 如何在2个选择框中显示所选日期而不是Joomla中的默认输入,如下图所示?

替代文字

I tried searching the calendar-setup.js file but couldn't locate any function to do this. 我尝试搜索calendar-setup.js文件但找不到任何函数来执行此操作。 I want to bind the click event of the calendar to the select boxes. 我想将日历的click事件绑定到选择框。

Any suggestions? 有什么建议?

That could get a bit hairy. 这可能有点毛茸茸。 The calendar most likely passes a string back in a format specified by the calendar's options. 日历最有可能以日历选项指定的格式返回字符串。 If this is the case, matching the format string to the values for the items in the dropdown will likely do the trick. 如果是这种情况,将格式字符串与下拉列表中的项目的值匹配可能会起到作用。 Something to the effect of: 有效的东西:

function clickCallback(clickValue){
   document.getElementByID().selectedIndex = clickValue;
}

This trick is figuring out how you are going to get the index and the values returned to line up. 这个技巧是弄清楚你将如何获得索引和返回的值排列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM