Dinav Ahire
Dinav Ahire

Reputation: 583

Not showing data in month and year dropdown in datepicker

I am using JQuery datepicker with month and year value.

but the problem is, in the dropdown of month and year, only white spaces are visible, if I hover in the opened dropdown then only month and year respectively are visible. If I take mouse away, there is only blank white dropdown, again I hover in dropdown list, month and year is visible. I can select then. The only problem is it is not visible.

My code for datepicker

<script type="text/javascript">
        jQuery(function ($) 
        {
            $("#<%= txtDOB.ClientID %>").datepicker({
                changeMonth: true,
                changeYear: true,
                dateFormat: 'mm/dd/yy'
            });
        });
    </script>  

textbox in which i am applying it:

<div class="col-sm-5">
                        <asp:TextBox ID="txtDOB" runat="server"  placeholder="mm/dd/yyyy"></asp:TextBox>
                    </div>
                    <div class="col-sm-4 no-padding">
                        <p class="error">
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator_txtDOB" ValidationGroup="Employee"
                                runat="server" ErrorMessage="Invalid Date.." ControlToValidate="txtDOB"
                                ValidationExpression="^([0-9]{1,2})[./-]+([0-9]{1,2})[./-]+([0-9]{2}|[0-9]{4})$"></asp:RegularExpressionValidator>
                        </p>
                    </div>

year

month

Upvotes: 1

Views: 2507

Answers (1)

gr8jr
gr8jr

Reputation: 31

.ui-datepicker .ui-datepicker-title select {
    color: #000;
}

it is working!

Upvotes: 3

Related Questions