How to make TV of type "date" with choice of a year only? The option to enter any date of the year, and then output only "%Y" considered, it does not suit.
modx revo tv type "of date" with a choice of only year
160 Views Asked by Anton Bukreev At
1
There are 1 best solutions below
Related Questions in MODX
- Tracking the date of a resource's major changes on MODX3
- When sending a link in the messenger, the preview is displayed in only one language
- After the redirect I get the page: Site 'xxx' has redirected too many times
- When a client leaves a request,he receives an automatic response,and regardless of what language the form is in,he sends the EN version of the letter
- I need to get the TV field of the child resource
- It is necessary to implement the link so that the English version don't have the prefix /en/
- Modx. When I try to compress an image for mobile phones using pThumb, nothing happens
- MODX, curl and the anonymous sessions
- Displaying the latest topics with the first post from the forum to the website
- How can I filter multiple field using checkbox and HTMX?
- Upload permission modx
- Sort gallery modx
- modx migx. How to start idx from 6?
- MODX3 Manager language setting
- Sum objects in array by the key of month
Related Questions in MODX-REVOLUTION
- Tracking the date of a resource's major changes on MODX3
- When sending a link in the messenger, the preview is displayed in only one language
- Litespeed Cache Headers
- When a client leaves a request,he receives an automatic response,and regardless of what language the form is in,he sends the EN version of the letter
- I need to get the TV field of the child resource
- MODX, curl and the anonymous sessions
- Issue Installing GTM on MODX revolution ERROR ...pdotools/pdotools.class.php : 999) Unexpected tag 'w' in head line
- modx migx. How to start idx from 6?
- MODX3 manager sessions expiry frequently
- Include CSS and Javascript in specific Modx page
- MODX SimpleSearch uses always the default container
- Cache clearing fails in MODX3.0.2
- how to automatically save changes to modx made through the database?
- Is there any way in modx that will automate the writing of relative paths?
- Is it possible to import html files throught phpmyadmin into templates table in database?
Related Questions in MODX-RESOURCES
- Tracking the date of a resource's major changes on MODX3
- Cache clearing fails in MODX3.0.2
- Why does the redirect to page 404 in MODX not work?
- Modx *id isnot =`` and isnot=`` not working
- Export rendered html files as zip from modx
- How to fetch articles on custom page in MODX CMS
- Multiple Contexts: One ReadOnly, One FullControl
- Modx Revolution tree of resources (documents)
- modx revo tv type "of date" with a choice of only year
- MODx Revolution Multidomain/Contexts same content
- MODX revolution: get second level children
- Modx redirect user to a specific page after manager login
- IDX condition in a getresource tpl
- How do I create a reusable mailto link in ModX?
- Modx revo 2.4.2 Get resource level
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Your question is a little hard to understand, but I think you are asking how to only have year selection (so no month and day selection) in a date template variable. The date template variable may not work ideally for this since it wants at least a day and month.
Small Set of Known Years
One solution could be to use a ListBox Single Select template variable if you have a limited set of known years to select from. Set each year you want as an input option value. For example, for the years 2017, 2018, 2019, and 2020 you would have:
2017||2018||2019||2020However, this wouldn't be ideal for a larger potentially unknown range of years.
Larger Set of Years
Another solution could be to use a text field template variable and use the regex validator to check if it is a valid year. A simple check such as
^[12][0-9]{3}$would make sure the input is a 4 digit year between 1000 and 2999.