How can I change the due date from 12.00 pm to 6 p.m. #459

Closed
opened 2026-02-04 19:41:37 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @anothaiyoyo on GitHub (Apr 4, 2024).

Hello , How can I manually change the due date from 12.00 pm to 6 p.m. from the card list it has so many card that users working on they're not comfortable to change due date on every card , is it has any solution for do the manually change the time from 12p.m. to 6 p.m. ? , I trying to change from DueDateEditStep.jsx but it's not change though .
Screenshot_1

also it would be great if the due date can change the color from time to time if it nearly due date like from orange to red if we not checking that it's done .

Thank you !

Originally created by @anothaiyoyo on GitHub (Apr 4, 2024). Hello , How can I manually change the due date from 12.00 pm to 6 p.m. from the card list it has so many card that users working on they're not comfortable to change due date on every card , is it has any solution for do the manually change the time from 12p.m. to 6 p.m. ? , I trying to change from DueDateEditStep.jsx but it's not change though . ![Screenshot_1](https://github.com/plankanban/planka/assets/88341320/8b5fcfd8-ecde-4f50-8e16-833f806c3273) also it would be great if the due date can change the color from time to time if it nearly due date like from orange to red if we not checking that it's done . Thank you !
Author
Owner

@meltyshev commented on GitHub (Apr 4, 2024):

Hi! We don't have a way to change a due date for all cards in the list yet, but you can try opening your browser console (F12 in Chrome) and running this script:

const CARD_ID = '1234567890'; // <- ID of any card in the needed list (you can open a card and take it from the URL)
const DUE_DATE = '2025-01-01T10:00:00.000Z'; // <- needed due date in UTC

const getCookie = (name) => {
  const value = `; ${document.cookie}`;
  const parts = value.split(`; ${name}=`);
  if (parts.length === 2) return parts.pop().split(';').shift();
}

const cardElement = document.querySelector(`[data-rbd-draggable-id="card:${CARD_ID}"]`);
const accessToken = getCookie('accessToken');

for (const child of cardElement.parentElement.children) {
  if (child.dataset.rbdDraggableId) {
    const cardId = child.dataset.rbdDraggableId.split(':')[1];

    fetch(`${window.BASE_URL}/api/cards/${cardId}`, {
      method: 'PATCH',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${getCookie('accessToken')}`,
      },
      body: JSON.stringify({ dueDate: DUE_DATE }),
    });
  }
}
@meltyshev commented on GitHub (Apr 4, 2024): Hi! We don't have a way to change a due date for all cards in the list yet, but you can try opening your browser console (F12 in Chrome) and running this script: ```js const CARD_ID = '1234567890'; // <- ID of any card in the needed list (you can open a card and take it from the URL) const DUE_DATE = '2025-01-01T10:00:00.000Z'; // <- needed due date in UTC const getCookie = (name) => { const value = `; ${document.cookie}`; const parts = value.split(`; ${name}=`); if (parts.length === 2) return parts.pop().split(';').shift(); } const cardElement = document.querySelector(`[data-rbd-draggable-id="card:${CARD_ID}"]`); const accessToken = getCookie('accessToken'); for (const child of cardElement.parentElement.children) { if (child.dataset.rbdDraggableId) { const cardId = child.dataset.rbdDraggableId.split(':')[1]; fetch(`${window.BASE_URL}/api/cards/${cardId}`, { method: 'PATCH', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${getCookie('accessToken')}`, }, body: JSON.stringify({ dueDate: DUE_DATE }), }); } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#459