#1
Hello to all the Trongate people,

I have a few issues with the date/time picker. This is the first of two questions!

I have changed the settings in public/js/trongate-datetime.js so that Saturday is the first day (I am making a booking system where holidays are generally Saturday to Saturday):



This doesn't seem to have any effect on the datepicker though. I have changed the dayNames array and this did have an effect, so I am in the right file.

I wondered if it was a bug as I can't see anything in the code that would change the order of the dates - other than a few checks to see if weekStartsOn is 1.

Cheers,

Chris
#2
Hi,


will not work, because 0 or 1 are the only valid settings for this variable in the source code.
#3
Ah, that's annoying!!

Who starts their week on a Sunday!
#4
It's worse than that. He wants to start his week on a Saturday.

Anyway... the options you have are; weekStartsOn 1 for Sunday or 0 for Monday.

If those aren't good enough then you're gonna have to tweak the trongate-datetime.js file to suit your use case.

If that's not acceptable then I would suggest submitting a module request at:

https://trongate.io/module_requests/create

Hope this helps.
#5
David,
Module request is a great idea!
Dan
#6
Managed to achieve the required result by hacking the trongate-datetime.js file.

My process:

1. Changed the day that the week starts on to Saturday (useful for the leisure industry)



2. Reordered the daynames variable, so that Saturday is first:



3. Changed code around line 495 to:



4. Commented out the code at the start of the buildTopRow() function as this is now dealt with by manually re-ordering the array in settings



The code could be improved in step 3 to suit any weekStartsOn variable, but it is working perfectly for me now so I'm moving on!