Date custom field not supporting data format on entry #2354

Closed
opened 2025-12-29 17:25:11 +01:00 by adam · 2 comments
Owner

Originally created by @robbagithub on GitHub (Feb 7, 2019).

Environment

  • Python version: 3.6.6
  • NetBox version: 2.5.4

Steps to Reproduce

  1. Set date format to desired format in configurations.py (screenshot below). I've chosen 'j-M-y'. Save file.
  2. Add custom field to dcim > device
  3. Set type to Date and Create name, description.
  4. Leave label, required not checked, filter logic = loose, no default and weight = 100
  5. Select a device and enter date into custom field using format that was set int he configurations.py file.
  6. Error occurs stating that wrong date format is being used. Only the standard system one can be used successfully, 'Y-m-d' or '2019-Feb-2'

Changes made to configurations.py file below

configurations

Custom field creation

create custom

Expected Behavior

I expected to be able to enter in the date in the device page in the format that I had specified in the configurations.py file.

Observed Behavior

The device page would only except field input using the standard format of 'Y-m-d'
create custom error

Originally created by @robbagithub on GitHub (Feb 7, 2019). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6.6 * NetBox version: 2.5.4 ### Steps to Reproduce 1. Set date format to desired format in configurations.py (screenshot below). I've chosen 'j-M-y'. Save file. 2. Add custom field to dcim > device 3. Set type to Date and Create name, description. 4. Leave label, required not checked, filter logic = loose, no default and weight = 100 5. Select a device and enter date into custom field using format that was set int he configurations.py file. 6. Error occurs stating that wrong date format is being used. Only the standard system one can be used successfully, 'Y-m-d' or '2019-Feb-2' **Changes made to configurations.py file below** ![configurations](https://user-images.githubusercontent.com/22147754/52395988-2610a780-2b04-11e9-90d2-26716748911a.jpg) **Custom field creation** ![create custom](https://user-images.githubusercontent.com/22147754/52395812-9f5bca80-2b03-11e9-9716-a798bfda5666.jpg) <!-- What did you expect to happen? --> ### Expected Behavior I expected to be able to enter in the date in the device page in the format that I had specified in the configurations.py file. <!-- What happened instead? --> ### Observed Behavior The device page would only except field input using the standard format of 'Y-m-d' ![create custom error](https://user-images.githubusercontent.com/22147754/52395854-bc909900-2b03-11e9-87f2-13cef99c22e4.jpg)
adam closed this issue 2025-12-29 17:25:11 +01:00
Author
Owner

@tb-killa commented on GitHub (Feb 7, 2019):

Hi @robbagithub please read this: https://groups.google.com/forum/?nomobile=true#!topic/netbox-discuss/0_LOtVUYtdM

@tb-killa commented on GitHub (Feb 7, 2019): Hi @robbagithub please read this: https://groups.google.com/forum/?nomobile=true#!topic/netbox-discuss/0_LOtVUYtdM
Author
Owner

@robbagithub commented on GitHub (Feb 7, 2019):

Yep sounds like expected behavior and not a bug. We'll remove the date entry field almost no one will understand that! Thanks tb-Killa

@robbagithub commented on GitHub (Feb 7, 2019): Yep sounds like expected behavior and not a bug. We'll remove the date entry field almost no one will understand that! Thanks tb-Killa
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2354