2014-01-09 209 views
-1

我有不同的層次來選擇日期選擇日期相對於分配給下面的客戶優先級位交代選擇日期

Member with level 1 can select dates from today till 5 more upcoming days 
    member with level 2 can select till 10 th days from now 
    member with level 5 can select till next months days from now 

這裏是我的代碼 可以ANY1幫我實現這個functionlity

<script type="text/javascript"> 
    window.onload = function(){ 
     new JsDatePick({ 
      useMode:2, 
      target:"inputField", 
      limitToToday:false, 
      dateFormat:"%d-%M-%Y" 
      /*selectedDate:{    This is an example of what the full configuration offers. 
       day:5,For full documentation about these settings please see the full version of the code. 
       month:9, 
       year:2006 
      }, 
      yearsRange:[1978,2020], 
      limitToToday:false, 
      cellColorScheme:"beige", 
      dateFormat:"%m-%d-%Y", 
      imgPath:"img/", 
      weekStartDay:1*/ 
     }); 
    }; 

我使用這個插件

http://javascriptcalendar.org/javascript-date-picker.php

+0

適合你使用其他插件.. –

+0

這裏是必需的代碼,即邏輯 插件正確choosen 我想到一些專業人士回答有點像bikash錢德拉無用的答案 – Sam

+0

@surajmishra如果您使用的插件,那麼爲什麼你要編輯。你會得到另一個更好的插件。只是谷歌它..... –

回答