Not showing data in month and year dropdown in datepicker

本秂侑毒 提交于 2019-12-11 13:44:06

问题


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>


回答1:


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

it is working!



来源:https://stackoverflow.com/questions/30929883/not-showing-data-in-month-and-year-dropdown-in-datepicker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!