Hello Everyone,
Im using datepicker to highlight a few dates that are pulled from my Database
Ive Followed Instructions by Jake From the thread below & got almost everything working(Thanks Jake)
However im facing issue with date's Format
Ive Noticed Dates work When i pass them as :
var datesArray=['2016-7-1','2016-7-2']
However the same date when Passed as:
var datesArray=['2016-07-01','2016-07-02']
Fails to be highlighted In the Datepicker
My problem is The Array in Which my Database stores all Dates Outputs in the 2016-07-01 i.e yy-mm-dd Format
So the Question is how to i make datepicker work with the same format
Inserting all Relevant Code Blocks
-
- $(function(){
- $('#ShowBooking').datepicker({
- inline: true,
- dateFormat: 'yy-mm-dd',
- beforeShowDay: function (date) {
- var theday = date.getFullYear() +'-'+
- (date.getMonth()+1)+ '-' +
- date.getDate();
- return [true,$.inArray(theday, DisabledDays) >=0?"specialDate":''];
- }
- });
This is the code for my Array
- <script type="text/javascript">
- var DisabledDays = new Array();
- <%
- Dim index : index = 0
- Do Until recobj.EOF
- Response.Write "DisabledDays[" & index & "]='" & recobj(0) & "';" & vbNewLine
-
- recobj.MoveNext
- index = index + 1
-
- Loop
- %>
Any Help From Forums Seniors ? Thank You