B4J Tutorial SithasoDaisy TailwindCSS UI Toolkit: Q & A

Hi there

NB: Where possible, please include a simple project that demonstrates your use case.

Do you have any questions about SithasoDaisy UI Toolkit?

You can shoot it here and we will oblige.

Thanks in advance?


Join on Telegram


Check $5 WebApps

 
Last edited:

asales

Expert
Licensed User
Longtime User
I have added the locales for this. You can set such in the AD or code.
I started to check the modifications and is very good, until now. Thanks!

B4X:
fc.Locale = "pt-br"
1680655352478.png

The radiogroup and maxlength was fixed with version 1.31.
B4X:
radGender.Hide
message.MaxLength = 500
works fine now.
 

asales

Expert
Licensed User
Longtime User
I try this code from File Input:
B4X:
fi = page.Cell(1, 1).AddFileInputLabel("fi", "Upload File", "(png, jpg, jpeg)", False)
fi.AcceptImagesOnly
It works fine to image, but I need to filter other types (to avoid upload a wrong file type).

There is a way to filter the file extensions to ".txt,.json,.cad", for example?

Thanks in advance.
 

Mashiane

Expert
Licensed User
Longtime User
I try this code from File Input:
B4X:
fi = page.Cell(1, 1).AddFileInputLabel("fi", "Upload File", "(png, jpg, jpeg)", False)
fi.AcceptImagesOnly
It works fine to image, but I need to filter other types (to avoid upload a wrong file type).

There is a way to filter the file extensions to ".txt,.json,.cad", for example?

Thanks in advance.
B4X:
.accept = ".txt,.json,.cad"

or

in abstract designer Accept property put - .txt,.json,.cad
 

asales

Expert
Licensed User
Longtime User
I'm trying to delete a file (after upload and read it).
This code below it seems works fine.
This is the correct code to make this in SithasoDaisy or there is another way?
B4X:
'delete the file
Dim php As SDUIPhp
php.Initialize("", False)
Dim res As String = banano.Await(php.FileDeleteWait(fileDet.FullPath))
 

Mashiane

Expert
Licensed User
Longtime User
I'm trying to delete a file (after upload and read it).
Yes... deleting files can be done using PHP, have not used anything else yet.

You can also find other file management functions (already built into SithadoSaidy) here

 

MichalK73

Well-Known Member
Licensed User
Longtime User
Hello.

SDUIChat. If I upload one message it works e.g. with SDUITexBox, but when I upload several messages (e.g. from an archive) only the first message is visible, the others are not.
How do I solve this?
B4X:
    chat.AddConversationToBasic("00","Witamy w pokoju")
    chat.AddConversationToBasic("01","/help - zobacz opcje usera")
    chat.AddConversationToBasic("02","/admin - zobacz opcje admina")
 

Mashiane

Expert
Licensed User
Longtime User
Hello.

SDUIChat. If I upload one message it works e.g. with SDUITexBox, but when I upload several messages (e.g. from an archive) only the first message is visible, the others are not.
How do I solve this?
B4X:
    chat.AddConversationToBasic("00","Witamy w pokoju")
    chat.AddConversationToBasic("01","/help - zobacz opcje usera")
    chat.AddConversationToBasic("02","/admin - zobacz opcje admina")
HTML element ids cannot start with a number. "01" is used to create an element id, which will start with that number, please prefix the id with an alphabet letter.
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
I have added the locales for this. You can set such in the AD or code.

B4X:
fc = page.Cell(1, 1).AddFullCalendar("fc")
    'https://fullcalendar.io/docs/locale-demo
    fc.Locale = "af"

View attachment 140548
Hello MAshiane,
Locale property is great, but I still have two issues with date picker.
1) if i add a datepicker column in a table, somehow the date shown is not the one stored in database, I could not understand why.
2) when i open the edit record dialog form to edit the record, the date is correct as the one on database, but the format date property has no effect. whatever you you write on the property, the date is always shown as Y-m-d,
 

Mashiane

Expert
Licensed User
Longtime User
Hello MAshiane,
Locale property is great, but I still have two issues with date picker.
1) if i add a datepicker column in a table, somehow the date shown is not the one stored in database, I could not understand why.
2) when i open the edit record dialog form to edit the record, the date is correct as the one on database, but the format date property has no effect. whatever you you write on the property, the date is always shown as Y-m-d,
It would help if there was an example to reproduce this or even screen shots of the issues. Do you want to help me out here please?
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
sure of course, I attach 2 screenshots, If you want i can send you the source, but in that case I should send you the db as well.
if i use this code on buildtable sub:
'tbl.AddColumnDatePicker1("dataordine", "Data Ordine",False,"d-m-Y","d-m-Y",False,False,False,"it")
the date shown is "20-03-2023" as you can see on first screenshot. if i press edit on this row. the date shown for the same field on edit window is "2023-03-11" which is the correct date saved in database.. (2nd screenshot.
if on buildtable i use:
tbl.AddColumn("dataordine", "Data Ordine")
the date will show "2023-03-11"

Screenshot 2023-04-21 alle 15.51.17.png


the real db value is 11-03-2023


Screenshot 2023-04-22 alle 00.10.17.png
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
sure of course, I attach 2 screenshots, If you want i can send you the source, but in that case I should send you the db as well.
if i use this code on buildtable sub:
'tbl.AddColumnDatePicker1("dataordine", "Data Ordine",False,"d-m-Y","d-m-Y",False,False,False,"it")
the date shown is "20-03-2023" as you can see on first screenshot. if i press edit on this row. the date shown for the same field on edit window is "2023-03-11" which is the correct date saved in database.. (2nd screenshot.
if on buildtable i use:
tbl.AddColumn("dataordine", "Data Ordine")
the date will show "2023-03-11"

View attachment 141390

the real db value is 11-03-2023


View attachment 141391

It would help if there was an example to reproduce this or even screen shots of the issues. Do you want to help me out here please?
Hello Mashiane,
I found out the the problem was in the date format parameters,

tbl.AddColumnDatePicker1("dataordine", "Data Ordine",False,"d-m-Y","d-m-Y",False,False,False,"it"). <--- wrong
tbl.AddColumnDatePicker1("dataordine", "Data Ordine",False,"Y-m-d","d-m-Y",False,False,False,"it"). <--- correct

still it looks like dateformat in sduitext column has no effect and date there is always shown as "Y-m-d"
 
Last edited:

Enrico Fuoti

Active Member
Licensed User
Longtime User
the second issue is also solved,
i found out that checking DP alt input property made format work in edit dialog form,
Sorry I should have digged a bit more before posting a hread. :)
Screenshot 2023-04-22 alle 11.42.30.png
 

Mashiane

Expert
Licensed User
Longtime User

giannimaione

Well-Known Member
Licensed User
Longtime User
how to enable
B4X:
 LOG(myvar)
with sithasodaisy / banano ?
 
Top