iT邦幫忙

0

使用cyberbiz想增加有日曆選單的功能

網站使用cyberbiz,已在商品頁面寫出日曆選單功能,想再加入購物車後能取得選的日期值,請大家幫幫忙~完全是新手等級
https://ithelp.ithome.com.tw/upload/images/20180730/20110833JD78NMAlNm.pnghttps://ithelp.ithome.com.tw/upload/images/20180730/20110833szMLR9rNZn.png
日曆選單語法如下:

<!-- 這一段放在 theme.liquid 的 title 後面-->
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<!-- 到這裡 -->
<script>
    // 這一段放在product.liquid的script裡面
    $(function() {
        $("#datepicker").datepicker();
    });
    // 到這裡
</script>
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0

$("#datepicker") 換成出發日期input的id 或class...

<script>
    // 這一段放在product.liquid的script裡面
    $(function() {
        $("input的id或class").datepicker();
    });
    // 到這裡
</script>

我要發表回答

立即登入回答