2014-04-02 43 views
1

這是我jsFiddle我怎麼能顯示月份部分只能從日期選擇器值

當日期值從日期範圍採摘,它需要表演的 - 像(至2014年5月4月)在桌子上,我加個兩個跨度在我的代碼中。 幾個月需要在範圍內顯示。

<div class="top1"> 
 
    <span id="from_month"></span> 
 
    <span id="to_month"></span> 
 
    <ul> 
 
    <li> 
 
     <label>From</label> 
 
     <input id="min" type="text" value="2014-01-17" class="date picker" /> 
 
    </li> 
 
    <li> 
 
     <label>To</label> 
 
     <input id="max" type="text" value="2014-01-27" class="datepicker" /> 
 
    </li> 
 
    <li> 
 
     <input id="check" type="submit" name="" value="Submit" /> 
 
    </li> 
 
    </ul> 
 
</div> 
 
<table cellpadding="0" cellspacing="1" id="our_table" class="jan"> 
 
    <tr id="dte"> 
 
    <th></th> 
 
    </tr> 
 
    <tr class="abc"></tr> 
 
    <tr class="abc"></tr> 
 
</table>

+0

我可以建議你檢查這個問題,並在這裏回答。它可能會幫助你https://stackoverflow.com/questions/21441830/get-month-names-between-2-dates – Kristiyan

回答

0

假設你正在使用jQuery UI日期選擇器,你可以改變的選項date format。谷歌的第一個結果會告訴你。

$("#datepicker").datepicker("option", "dateFormat", "M, y"); 
相關問題