Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed datepicker position in admin for produc edit advanced pricing #28

Merged
merged 6 commits into from
Jun 24, 2022

Conversation

AzizKHAN030
Copy link
Member

@AzizKHAN030 AzizKHAN030 commented Jun 14, 2022

Related issue(s):

Problem:

  • Date picker in for advanced pricing in admin panel was positioned incorrectly, sometimes in an unreachable place

In this PR:

  • Created a script that is run in header and positions the date picker on calendar button click

Copy link
Contributor

@zans-laksa zans-laksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there can be a better solution.
Let's have a call and find it together.

@zans-laksa
Copy link
Contributor

This one could be a more universal solution. But we have to be sure that this doesn't break other date picker fields.

(($) => {
    const show = $.datepicker._showDatepicker;
    
    $.extend($.datepicker, {
        _showDatepicker: (trigger) => {
            console.log('DATEPICKER SHOW', {
                trigger,
                datepicker: $.datepicker.dpDiv
            });

            // Your awesome code here
            
            return show(trigger);
        }
    });
})(jQuery);

@carinadues carinadues requested a review from zans-laksa June 22, 2022 11:13
@AzizKHAN030
Copy link
Member Author

PR can be tested on https://scandipwapmrevprtest-dev.indvp.com/

@Elena-Evsa
Copy link

Fixed on Chrome Win 10
Failed on FF Win 10:
image

Copy link
Contributor

@zans-laksa zans-laksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please redo based on my comments to previous review.

@AzizKHAN030
Copy link
Member Author

@Elena-Evsa can you please recheck the pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Calendar is shifted down in Admin panel
4 participants