Quantcast
Download
(16 Kb)
Download
Updated: 02/22/21 06:30 AM
Pictures
File Info
Compatibility:
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Updated:02/22/21 06:30 AM
Created:02/19/21 09:09 AM
Monthly downloads:2,249
Total downloads:2,344
Favorites:2
MD5:
6.2.5
LibAddonMenu - DatePicker widget
Version: 4
by: Baertram [More]
LibAddonMenu - DatePicker widget

A DatePicker widget for the library LibAddonMenu.
Just install it in addition to LibAddonMenu-2.0 (release 32 or newer is needed!) and use the new widget type "datepicker" in your addon'
settings panel.

Add to your manifest txt file:
Code:
## DependsOn: LibAddonMenuDatePicker
This widget is based on a combobox with dropdown and will show the datepicker as you click the combobox or the "open dropdown" arrow.
The picked date will be saved as a UNIX timestamp (same format like GetTimeStamp() provides) with the selected date and time 00:00:00 (midnight).

Description of the bullet points 1 to 6 (see image 1 of this addon):
  1. Previous month
  2. Select today and close date picker
  3. Select the month from a dropdown
  4. Select the year by help of the mouse wheel, +/- buttons or enter the year into the editbox
  5. Select the current year
  6. Next month


Provides the following parameters:
Code:
--[[datepickerData = {
    type = "datepicker",
    datePickerType = "normal", -- (optional)
    name = "My Datepicker", -- or string id or function returning a string
    getFunc = function() return db.var end,
    setFunc = function(var) db.var = var doStuff() end,
    tooltip = "Datepicker's tooltip text.", -- or string id or function returning a string (optional)
    width = "full", -- or "half" (optional)
    disabled = function() return db.someBooleanSetting end, -- or boolean (optional)
    warning = "May cause permanent awesomeness.", -- or string id or function returning a string (optional)
    requiresReload = false, -- boolean, if set to true, the warning text will contain a notice that changes are only applied after an UI reload and any change to the value will make the "Apply Settings" button appear on the panel which will reload the UI when pressed (optional)
    default = defaults.var, -- default value or function that returns the default value (optional)
    helpUrl = "https://www.esoui.com/portal.php?id=218&a=faq", -- a string URL or a function that returns the string URL (optional)
    reference = "MyAddonDatepicker" -- unique global reference to control (optional)
} ]]
Example usage in a LAM settings panel:
Lua Code:
  1. {
  2.             type = 'datepicker',
  3.             name = GetString(MYADDON_STRING_CONSTANT_DATE_FROM),
  4.             tooltip = GetString(MYADDON_STRING_CONSTANT_DATE_FROM_TT),
  5.             getFunc = function() return settings.dateStart end,
  6.             setFunc = function(dateTimeStampPicked)
  7.                 settings.dateStart  = dateTimeStampPicked
  8.             end,
  9.             width = "full",
  10.             reference = "MYADDON_DatePickerFrom",
  11.         },

GitHub
LibAddonMenu - DatePicker widget
[v4 (2021-02-22)]
-Updated FR translations (thanks to ImInfenix)

[v3 (2021-02-21)]
-Updated JP translations (thanks to Calamath)
-Updated widget version

[v2 (2021-02-19)]
-Fixed "us" to be the correct "en" language string
-Fixed width of datepicker control headline labels to show the weekdays properly in language en
-Fixed enabled state
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Uploader
Date
3
15kB
Baertram
02/21/21 01:42 PM
2
15kB
Baertram
02/19/21 10:38 AM
1
15kB
Baertram
02/19/21 09:09 AM


Post A Reply Comment Options
Unread 02/20/21, 03:16 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3348
File comments: 4071
Uploads: 66
Thank you, and thanks for the reminder: Added the github link to the description
Report comment to moderator  
Reply With Quote
Unread 02/20/21, 06:37 AM  
Calamath
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 4
Originally Posted by Baertram
Currently supported languages are EN and DE.
If you are able to provide translations to other languages please do so, here are the strings in English:
I have just sent a pull request to support Japanese mode.
- Calamath
Report comment to moderator  
Reply With Quote
Unread 02/19/21, 09:11 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3348
File comments: 4071
Uploads: 66
Currently supported languages are EN and DE.
If you are able to provide translations to other languages please do so, here are the strings in English:

Code:
["en"] = {
        WEEKDAYS        =   {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"},
        WEEKDAYS_LONG   =   {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"},
        MONTHS          =   {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
        MONTHS_LONG     =   {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"},
        CURRENT_DAY     =   "Current day",
        CURRENT_MONTH   =   "Current month",
        CURRENT_YEAR    =   "Current year",
        TODAY           =   "Today",
        NEXT_MONTH      =   "Next month",
        PREVIOUS_MONTH  =   "Previous month",
    },
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.