# Bug OP-16872 - Work package datepicker incorrectly renders turbo frame response

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 16.3.0 |
| Observed in versions | 15.5.0 |
| Sprint | 16.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 15.5.x |
| 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 | Attila Dombi |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Open the datepicker on a work package field
    
2.  Switch the datepicker between automatic and manual mode
    
3.  Observe the created DOM elements
    

### What is the buggy behavior?

*   The calendar turbo frame rendering is buggy and it bloats the dom when we switch between automatic and manual mode.
    
    This happens because the response is not replacing the correct turboframe, but an element inside it, causing a deeply nested bloating. Every time the re-render happens, a new turbo frame is added inside the existing one.
    

### What is the expected behavior?

_Describe how the application should behave like. Example:_

1.  The response replaces the content inside the turbo frame, without adding an extra turbo frame inside the turbo frame.
    

### Screenshots and other files

<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="https://private-user-images.githubusercontent.com/83396/418658749-3bf48a90-2c92-471c-a304-b1671851dc3a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDI5Mjk1NjUsIm5iZiI6MTc0MjkyOTI2NSwicGF0aCI6Ii84MzM5Ni80MTg2NTg3NDktM2JmNDhhOTAtMmM5Mi00NzFjLWEzMDQtYjE2NzE4NTFkYzNhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzI1VDE5MDEwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAxYWQwZWEzNzhkYzMxNWM2NDZjMmNiOTdmMjliYWM5MjhlYzdiM2JiNmMyNDllY2VkZGIyYjM0ZjkxYzE4M2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.H3LZrCdpRXXYx2uGgtz82oJEnDbQYlw32DxcKEZs1fU" alt="image"></div></figure>

###
