Skip to content

How to add custom css class name to the daterangepicker? #2291

Discussion options

You must be logged in to vote

Here is one solution,
`$(document).find('.stdate').each(function () {
$(this).daterangepicker(
{
//customClass: 'my-css',
opens: 'left',
autoUpdateInput: false,
//"parentEl": $(this).closest('div'),
locale: { cancelLabel: 'Clear' }

                    }).on('show.daterangepicker', function (ev, picker) {
                        picker.container.addClass('my-custom-css');                            
                    });
            });`

Custom style example:
<style> .daterangepicker.my-custom-css { z-index:9999 !important; } </style>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sridhargoshika
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant