[PR #15821] [MERGED] Fixes #15812: Add Date(Time)Var for scripts to allow much easier date… #14690

Closed
opened 2025-12-29 23:26:05 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15821
Author: @JCWasmx86
Created: 4/23/2024
Status: Merged
Merged: 4/29/2024
Merged by: @jeremystretch

Base: developHead: datevar


📝 Commits (2)

  • 0bf8cd7 Fixes #15812: Add Date(Time)Var for scripts to allow much easier date input
  • 22c2e7e Extend tests for invalid data

📊 Changes

3 files changed (+78 additions, -0 deletions)

View changed files

📝 docs/customization/custom-scripts.md (+8 -0)
📝 netbox/extras/scripts.py (+25 -0)
📝 netbox/extras/tests/test_scripts.py (+45 -0)

📄 Description

Fixes: #15812

Adds a DateVar and a DateTimeVar to make it easier to input these data types. I've added some really basic ScriptTests.

image

image

These input fields use native datepicker widgets provided by the browser.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15821 **Author:** [@JCWasmx86](https://github.com/JCWasmx86) **Created:** 4/23/2024 **Status:** ✅ Merged **Merged:** 4/29/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `datevar` --- ### 📝 Commits (2) - [`0bf8cd7`](https://github.com/netbox-community/netbox/commit/0bf8cd76906ddba26adcca6a9205288b038da0af) Fixes #15812: Add Date(Time)Var for scripts to allow much easier date input - [`22c2e7e`](https://github.com/netbox-community/netbox/commit/22c2e7e6e4c6fab6db169726b03ea5422279cf2d) Extend tests for invalid data ### 📊 Changes **3 files changed** (+78 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/customization/custom-scripts.md` (+8 -0) 📝 `netbox/extras/scripts.py` (+25 -0) 📝 `netbox/extras/tests/test_scripts.py` (+45 -0) </details> ### 📄 Description Fixes: #15812 Adds a `DateVar` and a `DateTimeVar` to make it easier to input these data types. I've added some really basic ScriptTests. ![image](https://github.com/netbox-community/netbox/assets/63594136/b598ca90-49b6-4a52-b40c-4a4ec4f4832e) ![image](https://github.com/netbox-community/netbox/assets/63594136/9d640ded-63c9-4104-843f-04978a11e036) These input fields use native datepicker widgets provided by the browser. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:26:05 +01:00
adam closed this issue 2025-12-29 23:26:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14690