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

MAGETWO-61209: Backport - Fixed issue #7379 with mage/calendar when setting `numberOfM… #16279

Conversation

vasilii-b
Copy link

@vasilii-b vasilii-b commented Jun 20, 2018

Description

The full description of the issue and steps to reproduce are provided in #7379.
The same issue is reproduced on Magento 2.1, Magento 2.2 and Magento 2.3-develop

Fixed Issues

  1. Calendar widget (jQuery UI DatePicker) with numberOfMonths = 2 or more #7379: Calendar widget (jQuery UI DatePicker) with numberOfMonths = 2 or more

Manual testing scenarios

The easiest way to see the issue in action is to add a new field in the Magento_Contact form that is gonna use a calendar.

Field to add:

<div class="field availability">
  <label class="label" for="availability"><span><?= $block->escapeHtml(__('Availability')) ?></span></label>
   <div class="control">
       <input name="availability" id="availability" title="<?= $block->escapeHtmlAttr(__('Availability')) ?>"
            value="<?= $block->escapeHtmlAttr($this->helper('Magento\Contact\Helper\Data')->getPostValue('availability')) ?>" class="input-text" type="text" />
  </div>
</div>

Initialize the calendar:

<script>
    require(['jquery', 'mage/calendar'], function($, calendar) {
       $('#availability').calendar({
           numberOfMonths: [1, 2]
       });
    });
</script>

You should see only 2 months displayed, like this:
image

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Original PR

#16278

…onths` to show more than 1 month

(cherry picked from commit 54e1a71)
@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Jun 20, 2018
@magento-engcom-team
Copy link
Contributor

Hi @vasilii-b. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on Pull Request changes
  • @magento-engcom-team give me new test instance - deploy NEW test instance based on Pull Request changes
  • @magento-engcom-team give me {$VERSION} instance - deploy Vanilla Magento instance for Issue or Pull Request

For more details, please, review the Magento Contributor Assistant documentation

@vasilii-b vasilii-b self-assigned this Jun 20, 2018
@vasilii-b vasilii-b changed the title MAGETWO-61209: Backport - Fixed issue with mage/calendar when setting `numberOfM… MAGETWO-61209: Backport - Fixed issue #7379 with mage/calendar when setting `numberOfM… Jun 20, 2018
@rogyar
Copy link
Contributor

rogyar commented Jun 22, 2018

Hi @vasilii-b. Thank you for the fix, works like a charm.

@vasilii-b
Copy link
Author

@rogyar can you please advice what to do next here as the Travis failed with an integration test ?
Is there anything needed from my side ?
Thank you!

@magento-engcom-team
Copy link
Contributor

Hi @vasilii-b. Thank you for your contribution.
The changes from your Pull Request should be available with the upcoming 2.2.6 release.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

@vasilii-b vasilii-b deleted the MAGETWO-61209-calendar-widget-number-of-months_mage22 branch June 30, 2018 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Lib/Frontend Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants