Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Selectfeld mit Jahr Monat Datum

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
truemaster
Smarty n00b


Joined: 08 Mar 2019
Posts: 2

PostPosted: Fri Mar 08, 2019 9:28 am    Post subject: Selectfeld mit Jahr Monat Datum Reply with quote

Hallo zusammen,

kann mir jemand sagen, wie ich mit einer Schleife zb die Jahre in einem Formular in Select packen kann? Also zB Startjahr und Endjahr. Muss das Selectfeld so haben, damit ich es noch mit CSS stylen kann.

Meine ganzen Ansätze klappen nicht. Selbst, wenn ich die Daten in ein Array packen möchte siehe Bsp.

Code:


$iTag = 1;
while ($iTag <= 31)
{
    $hallo[] +=   $iTag;
   
   $iTag++;        // es wird $i in Array gepackt
    // Wert wird um 1 erhöht
}

$smarty->assign('test',$hallo);
   
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Mar 08, 2019 5:49 pm    Post subject: Reply with quote

Use an actual calendar library. There's plenty available in JS.
Your approach simply can not work, not supposed to.

Also, this is not a Smarty question.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP