admin管理员组

文章数量:1122832

How can you display a double calendar with the daterangerpicker in embedded mode I want to display it as the example presented here : .html
It works very well with the classic datepicker.
Thanks for your help.

How can you display a double calendar with the daterangerpicker in embedded mode I want to display it as the example presented here : https://bootstrap-datepicker.readthedocs.io/en/latest/markup.html
It works very well with the classic datepicker.
Thanks for your help.

Share Improve this question asked Nov 21, 2024 at 14:44 Steph74Steph74 816 bronze badges 2
  • Could you show how your code looks and describe how the output differs from what you expect? – Stefan Hegny Commented Nov 21, 2024 at 14:57
  • <code>$('#datepicker').daterangepicker(); $('#datepicker').on('changeDate', function() { $('#my_hidden_input').val( $('#datepicker').daterangepicker('getFormattedDate'); ) })</code> – Steph74 Commented Nov 21, 2024 at 15:26
Add a comment  | 

1 Answer 1

Reset to default 0

Solution :

    $('#datepicker').datepicker({
        numberOfMonths: 2
    })
    $('#datepicker').on('changeDate', function() {
        $('#my_hidden_input').val(
            $('#datepicker').datepicker('getFormattedDate')
        )
    })

本文标签: javascriptHow to display a daterangepicker in embedded modeStack Overflow