logo
Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
bart  
#1 Posted : Friday, February 8, 2013 9:47:32 AM(UTC)
bart

Rank: Administration

Reputation:

Groups: Administration
Joined: 10/8/2008(UTC)
Posts: 188
Man

Was thanked: 1 time(s) in 1 post(s)
Hi,

It is possible to use form userescapes in the sienn cms. FormId is just -1 :)
so if you use this you can add a datepicker.
In the example below I use the datepicker for every fieldname which contains "datum" (dutch for date)
also I changed the locals to dutch so you might have to change this.
Code:
select case formid
  case -1
    Dim datepickerstr as string = ""
    datepickerstr &= "<link rel=""stylesheet"" href=""http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css"">" 
    datepickerstr &= "<script src=""http://code.jquery.com/jquery-1.9.0.js""></script>"
    datepickerstr &= "<script src=""http://code.jquery.com/ui/1.10.0/jquery-ui.js""></script>"
    datepickerstr &= " <script>"
    datepickerstr &= "$(function() {"
    datepickerstr &= "$("".cmsdatagrid_oneven:contains('datum'),.cmsdatagrid_even:contains('datum')"").next().find(""input.inputtext"").datepicker({"
    datepickerstr &= "  showOn: ""both"""
    datepickerstr &= "  ,buttonImage: ""http://jqueryui.com/resources/demos/datepicker/images/calendar.gif"""
    datepickerstr &= "  ,dateFormat: ""dd-mm-yy"""
    datepickerstr &= "  ,dayNamesMin: ['Zo', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za']"
    datepickerstr &= "  ,monthNames: ['januari','februari','maart','april','mei','juni','juli','august','september','oktober','november','december']"
    datepickerstr &= "   ,dayNames: ['Zondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag']"
    datepickerstr &= "});"
    datepickerstr &= "});"
    datepickerstr &= "</script>"
    
    TextLayout &= datepickerstr 
end select


the result is:
UserPostedImage

I hope you enjoy

regs Bart

Edited by user Friday, February 8, 2013 9:48:12 AM(UTC)  | Reason: Not specified

bart attached the following image(s):
datepicker.png

Wanna join the discussion?! Login to your Sienn Forum forum account. New Registrations are disabled.

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.