0

I need to have dialog box under the input field. The default behavior - to display above the filed. Tried to customize it using dialog method - haven't worked. What is the proper way to do it?

 <script>
    $(function() {
        $( "#adv-issue-date" ).datepicker();

            var handler = function() {};
            var dp-settings-param = "";
            var dp-pos = [100, 200];

            $( "#adv-issue-date" ).datepicker( "dialog", "10/12/2012, handler, dp-settings-param, dp-pos" );
            });
        </script>

UPDATE:

The datepicker dialog is not showing because of empty handler. This way also does not works :

var handler = function() {$( "#adv-issue-date" ).datepicker("show");};

2 Answers 2

1

Modify .ui-datepicker in the CSS file.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, but how to get current pos of input and display datepicker dialog just under it (so input field would be visible) ?
By default, the datepicker dialog does appear below the input field. jqueryui.com/datepicker
1

If you want to manually move the datePicker around:

    $(document).ready(DocReady);

    function DocReady()
    {
        $("#adv-issue-date").datepicker({ beforeShow: moveDatePicker });    
    }

    function moveDatePicker(input, inst)
    {
        inst.dpDiv.css({ marginLeft: "200px", marginTop: "200px" });
    }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.