I have a JavaScript code that has been entered to create an extra button in the Datepicker panel, when the input is mounted I went. ShowButtonPanel: "2014: 2034", "Setting", "True, First Show: Function (Input) {setTimeout (function () {var button page = $ (input) .data Picture ("widget") .Find (".ui-datepicker-buttonpane"); var btn = $ ('& lt; button class = "ui-datepicker-current ui-state-default-UI-priority-secondary-UI -corner-all "type =" button "& gt; CSA & lt; / button & gt; '); btn.unbind (" click ") .bind (" click ", function () {//$.datepicker ._clearDate (input); // Alert ('custom text'); $ (input) .Datiticker ("hide"); $ (input) .val ("0000-00-00");}); btn.appendTo (Buttonpane);}, 1);}}};});
Now when I click on the additional button "CSA" in the panel Yes, 0000-00-00 appears, what do I now want when the button "CSA" closes on today's date + 6 months when it is possible. Is it possible in DatyPictor?
< / Div>
I did some time ago to add calendar support to the calendar:
Without further tweaking you Can get a 6 month (from today) button.
The relevant part of this change is in the _generateHTML method.
var prev = (this._canAdjustMonth (inst, -1, one style = "left: 22px;" square = "ui-datepicker-prev ui-corner-all" onclick = " DP_junction_ '+ dpuuid +' .datepicker._adjustDate (\ '#' + Inst.id + '\', - '+ stepmoths +', \ 'm \'); '' + title = "'+ prevteext +'" & Gt; & lt; span class = "ui-icon ui-icon-circle-triangle- '+ (IRT?' E ':' W ') +'" & gt; 'prevteext +' & lt; / span & Gt; & lt; / a & gt; ': (A project to hide?' ': & Lt; style = "Left: 22px;" class = "ui-datepicker-prev ui-corner-all ui- State-disabled "title =" '+ prevteext +' "& gt; & lt; span class =" ui-icon ui-icon-circle-triangle- '+ (ISRTL?' E ':' W ') +' " & Gt; '+ prevteext +' & lt; / span & gt; & lt; / a & gt; ') Next; NextText = (! NavigationAssetAdit; Next Text: this.formatDate (next text, this._daylightSavingAdjust (new year (drawYear, drawMonth + stepMonths, 1)), this ._getFormatConfig (inst))); var next = (this._canadjustmonth (inst, +1, drawYear, drawMonth)? & Lt; One style = "right: 22px;" Class = "ui-datepicker-next ui-corner-all" onclick = "DP_jQuery_ '+ Dpuuid +' .datepicker._adjustDate (\ '#' + inst.id + '\', + '+ + + + Silence +', \ 'M \'); '' + 'title = "' + nextText + '" & gt; & Lt; Span class = "ui-icon ui-icon-circle-triangle- '+ (isRTL?' W ':' E ') +'" & gt; '+ Next Text +' & lt; / Span & gt; & Lt; / A & gt; ': (HideIfPrevNext?' ':' & Lt; a style = "right: 22px;" class = "ui-datepicker-next ui-corner-all ui-state-disabled" title = "'+ next text +" " & Lt; span class = "ui-icon ui-icon-circle-triangle- '+ (isRTL?' W ':' E ') +'" & gt; 'Next Text +' & lt; / Span & gt; & lt; / a & gt; ')); Next + = (Adjust this (this._canMonth (Insta, +1, Dryer, Dramonoth)? 'A class = "ui-datepicker-next ui-corner-all" onclick = "DP_junction_' + dpuuid + '.datepicker ._setDateDatepicker ($ (\ '#' + Inst.id + '\') [0], New Date (New Date). Set Month (New Date). GetMonth () + 6); "'+' title = "CSA"> Spine style = "cursor: pointer; cursor: hand;"> CSA
Comments
Post a Comment