fuelux : start datepicker on monday - datepicker

I try to load the datepicker of fuelux with start of the week to Monday.
i have already try this:
$('#myDatepicker').datepicker({
culture: 'fr',
format: 'L' });
but without success...

It should be, per datapicker options:
$('#myDatepicker').datepicker({
momentConfig: {
culture: 'fr',
format: 'L'
}
});
However, this will only set the format of the input box--not the calendar. I'm not sure if there is a way to have the calendar start on Monday (you can change the day names at the top to French, of course). The team was not aware that the "French week" started on Lundi. Please post an issue.

Related

Rundeck time format

In the "Activity for jobs' page in Rundeck the execution time has a relative time field (example: "Today at 10:15 AM" or "Last Sunday at 4:51 AM") after the timestamp.
It is easy to change the date format of the timestamp by adding jobslist...format[.ko] in the i18n/messages.properties file.
It seems impossible however to change the format of the relative time message. It seems to be hard-coded in en_US with AM/PM which doesn't look too good in in non-English-speaking countries. The format is always the same regardless of the ?lang=xx parameter or the default language in the browser. Interestingly, other objects (like hovering over the field with the mouse and the duration get translated).
Has anyone successfully changed this?
Example. See the duration field
I have been trying this with the docker images (4.8.0, 4.9.0 and SNAPSHOT)
I've looked at the source code and apparently this lies somewhere in the moment.js code.
In some parts, the date formats are hard coded as you say, please add your use case on this thread.

Watson assistant putting the day of the week in a variable based on user input of #sys-date

I'm making a bot that can take dinner reservations. When it asks for the users reservation time, I'd like the bot to populate my variable $dayoftheweek with the day of the week based on the date the user inputs. How would I be able to do that?
here is my slot "If Found".
Basically I'd like to know what "value" I could put in to get the day of the week populated.
The easiest would be to use the new system entities (currently in beta). Enable the beta in your skills options. Then, in your dialog node, assign the following:
Check for: #sys-data.day_of_week
save as: mydayofweek
Note that the day names are lower case.
You can use the method reformatDateTime of the expession language to get the day from #sys-date.
For example setting $dayofweek to
<? #sys-date.reformatDateTime('u') ?>
will set $dayofweek to a value between "1" (Monday) and "7" (Sunday)
or setting $dayofweek to
<? #sys-date.reformatDateTime('E') ?>
will set $dayofweek to a value between "Mo" and "Su"
The value of #sys-date is stored as a string format "yyyy-MM-dd" e.g. "2016-11-21".
If you want to know what day of the week that date is, you can use the method reformatDateTime:
"<? #sys-date.reformatDateTime('EEEE') ?>"
Here all the posibles values of the method
So your node would look something like this.
Or in JSON format:
{
"context": {
"dayoftheweek": "<? #sys-date.reformatDateTime('EEEE') ?>"
}
}
And here a small test of what would be stored in $dayoftheweek:
Watson: Hello. How can I help you?
User: Day of the week test
Watson: Tell me a date
User: September 13, 2019
Watson: Friday
Here is the JSON Skill for the test.

how to make a day from date in LibreOffice?

I want to convert date into a Day
I am using LibreOffice
I used some of its syntax weekday and text but it returns nothing
WEEKDAY("30-04-2019"; 1) is there any way to do that?
in google sheet i used =TEXT(C7758,"dddd") but it didn't work
how can I do that?
thanks in advance
Try the combination of functions WEEKDAY and DATE:
=WEEKDAY(DATE(2019;4;30))
The specific example will return 3 which is Tuesday (see all days and other options at https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_WEEKDAY_function)
Hope that helps.

How to restrict a dates of datepicker Fuelux?

How to restrict a dates of datepicker Fuelux???
I have a datepicker with several properties .
I need to restrict the first 20 days of January .
Is it ( 01-01-2015 Up 20-01-2015 ).
$('#myDatepicker1').datepicker('setCulture', 'es');
$('#myDatepicker1').datepicker('setFormat', 'DD-MM-YYYY');
$('#myDatepicker1').datepicker('setDate', '01-22-2015');
I found the next code, but Dont worked.
$('#myDatepicker1').datepicker(
'setDate', '01-22-2015
restricted: [{from: '01-01-2013', to: '01-01-2014'}]');
In advance thanks for the help you can give me.
setDate is not an initialization option. It is a method that can only be run once the control has been initialized.
Try something like this:
$('#myDatepicker1').datepicker({
momentConfig: {
culture: 'es',
format: 'DD-MM-YYYY'
},
restricted: [{from: '01-01-2013', to: '01-01-2014'}]
});
$('#myDatepicker1').datepicker('setDate', '01-22-2015');
Be sure that you have the MomentJS library loaded before Fuel UX.
Excellent answer. Thank Interactive Llama. It worked and works perfect. He presented a problem because when you set the start date inside the range of blackout dates , the datepicker not understand this configuration and sets the current day.
The correct configuration is initialized by placing the date outside the range of time blackout dates .
I also tried loading the moment.js before and after fuelux file, and in both cases the datepicker worked. Anyway I preferred to leave it as you indicated. (Load moment.js file before the Fuelux library).
Here is the final code for its observation.
$('#myDatepicker1').datepicker({
allowPastDates: true,
momentConfig: {
culture: 'es',
format: 'DD-MM-YYYY'
},
restricted: [
{from: '01-01-1900', to: '31-12-2014'}
]
});
$('#myDatepicker1').datepicker('setDate', '01-01-2015');
Thanks for your help Interactive Llama.

migx TV (MODx REVO) - date format

I have a problem: I cannot bring date without time through MIGX TV
created by TV type migx:
{«Field»: «Date», «caption»: «Date», «inputTVtype»: «date»}
I deduce that everything appears normal by this way [[+ date]], but it is displayed as date and time and I want to display only the date part!
I tried this [[+ date: date ="% Y-% m-% d"]] but instead of the correct date 1/1/1970 is displayed.
I understand that the problem is that I use the TV type migx, but I need to use migx because there can be lots of dates!
Help me, please!
http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+%28Output+Modifiers%29 - you need :strtotime modificator before :date -
[[+mydate:strtotime:date=`%Y-%m-%d`]]