Closed
Description
Preconditions
On Magento 2.1.1
Chrome on Linux Mint
Steps to reproduce
I'm using the tier pricing, but I imagine this occurs in other locations on the admin side.
- Create the following class
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\DataProvider\Modifier\ModifierInterface;
class DateRangeTier implements ModifierInterface
{
protected $arrayManager;
public function __construct(ArrayManager $arrayManager) {
$this->arrayManager = $arrayManager;
}
public function modifyMeta(array $meta)
{
$tierPricePath = $this->arrayManager->findPath('tier_price', $meta, null, 'children');
if ($tierPricePath) {
$meta = $this->arrayManager->merge(
$tierPricePath,
$meta,
$this->getTierPriceStructure()
);
}
return $meta;
}
public function modifyData(array $data){return $data;}
protected function getTierPriceStructure()
{
return [
'children' => [
'record' => [
'children' => [
'start_date' => [
'arguments' => [
'data' => [
'config' => [
'dataType' => 'date,
'formElement' => 'date',
'componentType' => 'field',
'label' => __('Start Date'),
'dataScope' => 'start_date',
],
],
],
],
'end_date' => [
'arguments' => [
'data' => [
'config' => [
'dataType' => 'date',
'formElement' => 'date',
'componentType' => 'field',
'label' => __('End Date'),
'dataScope' => 'end_date',
],
],
],
],
],
],
],
];
}
- Add the class to your
etc/adminhtml/di.xml
:
<virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool" type="Magento\Ui\DataProvider\Modifier\Pool">
<arguments>
<argument name="modifiers" xsi:type="array">
<item name="subscriptionPricing" xsi:type="array">
<item name="class" xsi:type="string">Path\To\DateRangeTier</item>
<item name="sortOrder" xsi:type="number">95</item>
</item>
</argument>
</arguments>
</virtualType>
- Edit a product, and select Advanced Pricing. Add a Tier, and scroll right.
Expected result
The datepicker should scroll with the fields.
Actual result
The datepicker does not scroll with the rest of the fields. (I have more fields than the ones listed above, and so they cover up other fields).
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.1 release lineThe issue has been fixed in 2.2 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release