# Bug OP-9900 - Date indicator on the right edge of cards does not always render properly

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-9900

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date | 2021-11-01 – 2022-02-27 |
| Priority | Medium |
| Module |  |
| Target versions | 12.1.0 |
| Observed in versions |  |
| Sprint | 12.1.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### **Environment**:

  - OpenProject Edge
  - macOS 12,1 / Firefox 97,0 / EN
  - macOS 12,1 / Safari 15,2 / EN

### **Steps to reproduce:**

1.  Go to Team Planner
2.  Drag cards with an end date within the current date range to the right so that the end date is cut off

### **Actual Behavior**

This following gif illustrates the issue. The sequence goes like this:

  - First, a card ("asdf") that is contained within the date range is moved off-range, to the right, such that its end date is cut off
  - The card "snaps" into place, but the date indicator only shows an arrow (and no date)
  - Dragging it back removes the arrow (as expected)
  - Dragging it back to the right now,
      - Switches positions with the card that was previously beneath it ("Another task"), issue tracked in <mention class="mention" data-id="41111" data-type="work_package" data-text="#41111">\#41111</mention> (ignore for this bug)
      - Displays the date in the incorrect format ("- 21, 2022")

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/27569/content"></div></figure>

  - I was able to reproduce the error in Safari too:

<figure class="image op-uc-figure" style="width:50%;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/27570/content"></div></figure>

  - It is unclear why the date (even though it's incorrectly formatted) appears sometimes and does not at other moments.
  - This seems to affect only the right edge; I could not reproduce this bug on the left edge.

### **Expected Behavior**

  - Dragging a card towards the right so that its end date is cut off should:
      - Show the date indicator the date in "– \[Mmm dd\]" format (example: "– Feb 17"), followed by an arrow to the right.
  - Dragging it to the left such that the card is no longer *cut off* should remove the date indicator.
      - This behaviour should be the same as dragging a card out of the currently visible date range to the left.
