1

I have a date picker in my web application, when i click the date picker text box then date picker pop up is not showing near the text box but its showing in page down

 <td>                               
                             <table style="width: 100%">
                                 <tr>
                                     <td>
                                         <div id="CalendarPosition">
                                             <asp:TextBox ID="txtOriginalEffDate" runat="server" CssClass="renDatePicker"></asp:TextBox></div>
                                     </td>
                                 </tr>
                             </table>
                        </td>  

i have used below scripts

 $(function () {

        var effDate = "<%=this.effectiveDate%>";
        var maxdt = new Date(effDate);
         var effdate_year = maxdt.getFullYear();
        maxdt.setMonth(maxdt.getMonth() - 1);
        var allowedDates = "1,15";
        var dt_arr = allowedDates.split(",");

        $(".renDatePicker").datepicker({
            changeMonth: true,
            changeYear: true,
            yearRange: '2003:'+ effdate_year,
            maxDate: maxdt,
            //defaultDate: defaultDt,
            format: 'mm/dd/yyyy',
            orientation: 'auto bottom',
            beforeShowDay: function (date, inst) {
                if (dt_arr.indexOf(date.getDate().toString()) >= 0) {
                    return [true, ''];
                }
                return [false, ''];
            },
        });
    });

also this

 $(function () {
            $(".datetest").datepicker({
                changeMonth: true,
                changeYear: true
            });
        });

This working fine with the date picker but showing in page down.

    <script src="../js/jquery-ui.js" type="text/javascript"></script>
<link href="../Content/themes/base/jquery.ui.all.css" rel="stylesheet" /> 

Please suggest me to find the solution for the issue.

Thanks is Advance .

Bala
  • 125
  • 1
  • 2
  • 12
  • Check your CssClass="renDatePicker" and see where it is rendering, or simply remove your CssClass and render it – Ron Apr 12 '18 at 11:53

1 Answers1

0

Please try this

http://burnignorance.com/javascript-performance-tips/make-jquery-datepicker-to-popup-in-different-positions/

Use JQuery DatePicker on Textbox asp.net

How to change the pop-up position of the jQuery DatePicker control

Revathi Vijay
  • 1,238
  • 1
  • 13
  • 25
  • 1
    While these links may answer the question, it is better to include the essential parts of the answer here and provide the links for reference. Link-only answers can become invalid if the linked pages change. – Luca Kiebel Apr 12 '18 at 12:06