Created
September 13, 2022 02:25
-
-
Save asbasawaraj/faa649f50ef7fa207862c6024cef76c6 to your computer and use it in GitHub Desktop.
Client Script to Change Colour of Date Field in Project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frappe.ui.form.on('Project', { | |
refresh(frm) { | |
if (frm.doc.expected_end_date < frappe.datetime.get_today()) | |
{ | |
document.querySelectorAll("[data-fieldname='expected_end_date']")[1].style.color = 'red' | |
document.querySelectorAll("[data-fieldname='expected_end_date']")[1].style.fontWeight = 'bold' | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment